The HTML page
Every web page has a structure like this:
<html> (tells the browser that this is a web page)
<head> (between the <head> tags goes information for the browser on how to format the web page)
<body> (tells the browser to start displaying content)
<title> page title goes here; used by browser window and search engines</title>
</head> (the closing tag tells the browser where the head portion of the web page ends)
Everything that the viewer sees go here. <p>, <table>, <h1>, etc.
</body> (this closing tag tells the browser to stop displaying tags and content)
</html> (this closing tag tells the browser that this is the end of the web page)
HTML code | Browser displays |
<html> <head> instructions to the browser on how to display content </head> <body> content of the page that the viewer sees </body> </html> |
Tags in the <body>:
Within the <body> tag, are all the tags that give structure to your content; all content needs to be within a tag:
- <table> <tr> (table row) <td> (table data cell);
- <ol> (ordered list) <li> (list item);
- <h1> - <h6> (headings as in an outline) <p> (paragraph).
All of the tags must have an opening and closing tag (a couple of exceptions):
<p>This is a sentence.</p>
Remember that a web page is only made up of text - your content and the tags. All images, movies, sounds, etc. are inserted into the webpage the user sees by the browser at the time the browser displays the web page.
HTML code | Browser calls the image for the web server then inserts it and displays it. |
< img src="headset.gif"> |
Here are a few great resources on the structure of an HTML page and lists of tags.
- A good description of an HTML webpage and the basic tags - http://www.w3.org/MarkUp/Guide/
- Short list of HTML tags (XHTML tags have changed for some of the text formatting tags) - http://www.webmonkey.com/webmonkey/reference/html_cheatsheet/
- Start learning html - http://www.w3schools.com/html/default.asp
- HTML reference – long list ¬ http://www.w3schools.com/tags/default.asp
Last update: August 27, 2010