Page Structure and HTML
Document structure
Every page needs a doctype, a html root with a lang, a head containing meta charset and title, and a body. Dreamweaver's New Document dialog sets the doctype (HTML5 is the default); the Document Type choice drives which code hints and validators are offered. Candidates should know that the title element is required for validity, appears in browser tabs and search results, and is not the same as the first h1.
Semantics and structure
Understand the landmark elements: header, nav, main, section, article, aside, footer. A page should have one main. Heading levels should not skip (h1 to h3) for outline reasons. Lists, tables, and forms each have structural rules: table needs thead/tbody for data tables and must never be used for layout; label should be associated with a control via for/id or nesting.
Traps
- Deprecated elements:
font,center,marquee, and presentational attributes likebgcolorare obsolete; use CSS. altis required onimg; decorative images usealt="", not a missing attribute.- Self-closing vs. void elements:
br,img,input,meta,linkhave no closing tag. - Code view vs. Design view: Design/Live view can hide invalid nesting; validate in Code view.
- IDs must be unique per document; classes may repeat.
Rule of thumb
If a question asks how to make content accessible or valid, prefer semantic HTML plus CSS over attributes that merely change appearance. Structure first, style second.