How do I structure a basic html 5 web page?



  • HTML 4 and XHTML 1.0 had many document type definitions, know as DTD's. HTML 4 was based on SGML, Standard Generalized Markup Language.

    Also see: HTML <!DOCTYPE> Declaration

    HTML 5 simplifies things considerably. The only doctype is html. The following is the basic structure of a web page.

    <!DOCTYPE html>
    <html lang="en">
    
    <head>
      ...
    </head>
    
    <body>
      ...
    </body>
    
    </html>
    

    The html tag tells the browser what type of document it is. The head and body tags are containers. The head container describes information about the page and the body is the page content.


Log in to reply
 

© Lightnetics 2024