Brief HTML 5 Reference
Basic Tags and Document Structure
Here's a complete sample html page...
<!DOCTYPE html> <html lang="en"> <head> <title>My Page!</title> <link href="groovy_styles.css" rel="stylesheet" type="text/css" media="screen" /> <meta name="viewport" content="width=device-width; initial-scale=1.0;" /> </head> <body> <h1>Howdy</h1> <p>Welcome to my page</p> </body> </html>
Explanation...
- <!DOCTYPE html>
<html lang="en"> Starts an HTML document.
- <head>
Sets off the title and other information that isn't displayed on the Web page itself.
- <title>groovy page! </title>
Puts the name of the document in the title bar.
- <link rel="stylesheet" href="groovy_style.css"
type="text/css" media="screen" /> Connects this page to a separate stylesheet (to control color and font).
- <meta name="viewport" content="width=device-width; initial-scale=1.0;" />
For iphone and other devices:
“initial-scale=1.0;”
tells the browser to show text
full-size (like picture 1, below)
rather than shrinking the
whole page into a postage
stamp (see picture 2).
Would you rather see full-size
writing on your smart phone
(might have to scroll down)...
[picture 1]
[picture 2]
...or microscopic print with
the site showing the way it
looks on a larger monitor?
(Will have to zoom & then
scroll up & down and left
& right because words and
links are too small.)- </head>
End of the headings.
- <body>…</body>
Surrounds the visible portion of the document.
- </html>
Ends an HTML document.