| Beginners guide to HTML
Lesson 1 - Words
|
Web Browsers lay out the text as they want, you just tell them the
significant features of the text. All HTML (Hyper Text Markup Language)
consists of ordinary text and special marks in < Here >. The marks in
the text are either just individual things such as <thing> or they
affect a block of text, in which case one writes <thing> this is the
text affected by thing </thing>. Markups can generally be in any
case.
Lines can be as long as you want or as short as one word - it makes no
difference to the result. Spaces and new lines are just treated as breaks
between words, layout is ignored. Markups make '<' and '>' special, so
to put them (and '&') in text use < for < and > for
> and & for &. The '&' and the ';' at the end are
significant.
Bold
To put text in bold do <b>This is in bold</b> to produce This is in bold.
Italic
To put text in italic do <i>This is in italic</i> to produce This is in italic.
Paragraphs
At the end of a paragraph (where you actually want a paragraph break) do a <p>.
New Lines
If you want to force a new line, but not a paragraph do a <br>.
Headings
HTML supports 6 levels of headings. H1 is the biggest, H6 the smallest. Use them in order of significance. You don‘t need a paragraph break before a heading.
<h1>This is a big section heading</h1>
This is some introductory text
<h2>this is a lower heading</h2>
This is ordinary text
Every Document
Each html document should end .html (or .htm for older dos machines).
At the start of every HTML document put the following:
<html><head>
<title>Whatever you want as the title of the page</title>
</head><body>
The main text of the page goes here,
then at the end put:
</body></html>
Next Lesson
| Back to the index
| Exercises
Home |
Advice |
Hosting
Updated 17th of October 2002