<title>My first HTML document</title>
Change the text from "My first HTML document" to suit your
own needs. The title text is preceded by the start tag <title>
and ends with the matching end tag </title>. The title should be
placed at the beginning of your document.
To try this out, type the above into a text editor and save
the file as "test.html", then view the file in a web browser. If
the file extension is ".html" or ".htm" then the browser will
recognize it as HTML. Most browsers show the title in the window
caption bar.
Add headings
and paragraphs
If you have used Microsoft Word, you will be familiar with
the built in styles for headings of differing importance. In
HTML there are six levels of headings. H1 is the most important,
H2 is slightly less important, and so on down to H6, the least
important.
Here is how to add an important heading:
<h1>An important heading</h1>
and here is a slightly less important heading:
<h2>A slightly less important heading</h2>
Each paragraph you write should start with a <p> tag. The
</p> is optional, unlike the end tags for elements like
headings. For example:
<p>This is the first paragraph.</p>
<p>This is the second paragraph.</p>
Adding a bit
of emphasis
You can emphasize one or more words with the <em> tag, for
instance:
This is a really <em>interesting</em> topic!