Title: XHTML Documents Structure
1(X)HTML Documents - Structure
Doctype Declaration Information about code used
lt!DOCTYPE HTML PUBLIC "-//W3C DTD HTML 4.01
Transitional//EN" http//www.w3.org/TR/html4?loos
e.dtdgt lthtmlgt ltheadgt lttitlegt First HTML
examplelt/titlegt lt/headgt ltbodygt lth1gt welcome to
the world of HTMLlt/H1gt lthrgt ltpgtHTML ltbgtreallylt/bgt
isnt so hard!lt/pgt ltpgtWhat can be challenging is
learning to write the code in such a way that it
ltbgt does what you want it to.lt/bgtlt/pgt lt/bodygt lt/h
tmlgt
HTML element
Head Information about the document
Body Actual contents of the document
HTML element
2Doctype
lt!DOCTYPE HTML PUBLIC "-//W3C DTD HTML 4.01
Transitional//EN http//www.w3.org/TR/html4?loos
e.dtdgt gt lthtmlgt ltheadgt lttitlegt First HTML
examplelt/titlegt lt/headgt ltbodygt lth1gt welcome to
the world of HTMLlt/H1gt lthrgt ltpgtHTML ltbgtreallylt/bgt
isnt so hard!lt/pgt ltpgtWhat can be challenging is
learning to write the code in such a way that it
ltbgt does what you want it to.lt/bgtlt/pgt lt/bodygt lt/ht
mlgt
- lt!DOCTYPEgt
- Is a comment
- Tells the browser to which Document type
definition (DTD) the document conforms - Allows downloading of the DTD and any entity sets
needed
- DTD
- To validate HTML documents begin by declaring the
version of HTML used in a document type
declaration.