Hypertext markup language (HTML) headers are the sections of HTML code reserved for the title and any metadata included in an HTML document. HTML headers follow the same structural rules as other page elements when it comes to creating tags. A header normally has the opening tag
and the closing tag . One of the fundamental rules of working with HTML documents concerns the difference between HTML headers and body text. While an HTML editor can help automate this process, learning HTML manually with a simple
is often considered a better way to understand its overallsyntax
Writing HTML code is a basic skill for website design, and many seasoned professionals believe it is more important than the use of editing software programs that allow push-button website creation without the need to learn any coding. Creating an HTML header is usually one of the first lessons for newcomers to this website design language. The opening header tag appears on the second line after the opening tag at the top of a new HTML document. Unlike other data outside of the header tags, information enclosed in the header tags does not appear when the finished HTML document is rendered in a web browser.
The title entered in HTML headers is the web page title that usually appears in the top left corner of the web browser window. Most HTML coders add metadata in the next line after this title. This information can include the name of the website author, the designated copyright year, and any keywords the author wishes to include. Adding keywords in metadata tags is one established method of making a new website easy for major search engines to find. Although metadata does not appear in a web browser, each tag still needs to follow correct syntax rules for HTML headers.
A metadata tag included in an HTML header lists the type of metadata tag followed by its content. HTML headers that include the website author's name would be written , for instance. After the author enters all desired metadata information, the HTML header is then closed with the tag. The body text is then entered within its corresponding tags. A frequent beginning mistake is to enter the opening
tag before the tag, and this oversight will normally cause an error when the author attempts to render the document in a browser.