HTML Cheat Sheet for Transition to HTML 5

HTML Page Structure

pagename.html Purpose Attributes
<?xml version="1.0" encoding="UTF-8"?> xml declaration, recommended version, encoding
<?xml-stylesheet type="text/xsl" href="/template.xsl"?> stylesheet processing instruction, optional type, href
<!DOCTYPE html> document type declaration, recommended PUBLIC, SYSTEM
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <html> top element tag, required xmlns manifest version common
  <head>
head section, required
profile common
      <title>...</title>
      ...other head section tags...
title tag, required
HTML Head Section Tags
common attributes
  </head> End of <head> section  
  <body>

      ...body tags...
<body> tag, required

HTML Body Tags
alink background bgcolor link onafterprint onbeforeprint onhashchange onmessage onoffline ononline onpopstate onredo onstorage onundo text vlink common
  </body> End of body of HTML document  
</html> End of HTML document  

Prev: Page 1 

Home > HTML Cheat Sheet for Transition to HTML 5 > Page Structure

Viewing mobile website page. Switch to WML or Full HTML