C. First Tags

1. Section Headings


You may define headings in levels from 1 to 6.  Try them out.


<h1>Level 1 Heading</h1>

<h2>Level 2 Heading</h2>



2. Paragraphs and Line breaks

Blocks of text are separated using the <p></p> tags.  Line breaks use the <br /> tag.

<p>This is a paragraph of text. In HTML 4 you don't have to close the tag, but in xhtml, and when you use stylesheets, you do.  Note also that all the tags are in lower case letters.  Thats an XHTML thing too.</p>

<br />
<p>Creates an extra line break.  Note again that the tag has a closing slash.  You need this in XHTML.  In HTML you can get away with <br>. 
The closing tags make your document into valid XML.  Thats why they are important.</p>

<p>By the way, in XHTML you must also properly "nest" all your tags". </p>



3. Experiment with bold, italic and underline


Excuse Me</i>, <b>Why</b> are we <u>here</u>?



4. Documenting your work: adding comments


<!-- Any text between these markers will not be interpreted in the browser, but they will be visible to anybody editing your source code, or looking at it using the "view source" option in their browser.  Use comments to remind yourself what you have done or send messages to other designers and programmers you are working with. -->



Next: More Tags