Home > Teaching > Tutorials > HTML Tutorial
<!-- the four characters to the left (ie, <!--) start comments. Comments do not end at line breaks and are not displayed on the page, only in the code. They will only end after the following three characters -->
Extra spaces and line breaks are ignored in HTML.
Tags come in two varieties -- ones that need closure and ones that don't.
No closure examples: an image and a line break
<img src="windmill.JPG" /> <br />
General form:
<tag />
Closure examples: paragraph and font
<p><font color="blue">This creates blue text in a paragraph.</font></p>
General form:
<tag>What the tag will influence</tag>
Does it matter if tags are closed if they are supposed to be? Yes, sometimes it will display improperly and it also makes it easier to read your HTML when changes are to be made. It is generally a good idea to close all tags that are supposed to be closed.
Not all characters display directly (or at least properly) in HTML. For example, instead of making a quotation mark explicitly, use the following:
"
Some other such characters include &, ¢, ©, ®. To find a list of special characters (when you need them), Google "html special characters."
You may view a page's source code (HTML code) by right-clicking on the page and clicking "View Page Source."
Next page: head and body |