Beginning HTML5 and CSS3 For Dummies
Book image
Explore Book Buy On Amazon

HTML document structure is hierarchical, so an entire document includes a head section. Thus, immediately following the opening element is where you define the head section, starting with an opening element and ending with a closing element.

Meeting the himself

The head is one of two main components in any HTML document; the body is the other main component. The head, or header, provides basic information about the document, including its title and metadata (information about information), such as keywords, character encoding, author information, and a description.

If you want to use an external style sheet within a page, information about that style sheet also goes into the header. Please do likewise — that is, add information to the head — if you want to establish a base for URLs referenced in a document, or call a script.

The element, which defines the page header, immediately follows the opening element:

  
  

Handling metadata with

Literally, metadata means data or information about data. Thus, the meta element is used to provide information about the HTML document inside which it appears. All elements always appear inside the HTML , and may be used to define the character encoding — that is, the bit level codes used to represent character data — inside an HTML document.

They can also define keywords for search engines, describe document content, identify the document’s author, define a document refresh interval (the interval at which a page automatically reloads itself), and more.

This listing shows all of these things for a hypothetical HTML document.

  
     

About This Article

This article is from the book:

About the book authors:

Ed Tittel is a 30-year veteran of the technology industry with more than 140 computing books to his credit, including the bestselling HTML For Dummies.

Chris Minnick runs Minnick Web Services. He teaches, speaks, and consults on web-related topics and has contributed to numerous books, including WebKit For Dummies.

This article can be found in the category: