Setting Up the Document Structure in HTML5
- 11/15/2012
Key Points
In this chapter, you learned how to create the overall structure of a document and how to divide it into head and body sections. You learned how to create paragraphs and how to add a page title. Here are the key points to remember from this chapter:
To specify HTML5 as the document type, type <!DOCTYPE html> at the beginning of the file.
All the HTML coding in a document (except the DOCTYPE) is enclosed within a two-sided <html> tag.
The <html> and </html> tags enclose the <head> and <body> sections.
The <head> area contains the page title (<title>) and any <meta> tags. The <body> area contains all the displayable text for the page.
Enclose each paragraph in a two-sided <p> tag. Most browsers add space between paragraphs when displaying the page.
To create a line break without starting a new paragraph, use the one-sided <br> tag.
When coding for XHTML, end one-sided tags with a space and a slash (/). The space is required for recognition in HTML, and the slash is necessary for recognition in XHTML.
Use the <title> and </title> tags to enclose the text that should display in the browser’s title bar. Place these in the <head> section of the file.
Use <meta> tags in the <head> section to indicate keywords and the document encoding language.