HTML codes consist of tags that are mostly paired. A tag is a string enclosed in angle brackets.
<tag>some text goes here</tag>
Some are not:
<br>, <hr>, <img>
Some can optionally have end-tags:
The minimal HTML document looks like this:
<p></p>, <li></li>
Many tags contain attributes that change the features of the tag. For example:
<html>
<head>
<title>. . .</title>
</head>
<body>
</body>
</html>
<body bgcolor="#FF0000">
creates a red background instead of the default color. The
"#FF0000" is called the "value" of the attribute.
Allen Johnson (a BCN volunteer) has developed this interactive color picker
Here are some basic tags:
<title>This is the Title</title>
Titles are what show up at the top of the browser and in a bookmark.
<body>This is the body of your Web page.</body>
The body is the content of your Web page.
<h1>Level 1 Head</h1>
<h2>Level 2 Head</h2>
<h3>Level 3 Head</h3>
A Head 1 will usually be the biggest and boldest. However, the exact way that headings look is determined by the browser. Netscape might format headings a little differently than, say Internet Explorer. Usually, though, a header is followed by a line space.
<p>
Paragraphs usually add an extra line space at the end of a paragraph.
Create an HTML file with some heading and some paragraphs
note that internal spacing is ignored, and also
the capitalization of tags is irrelevant
<li><Li><LI>
all work the same
Other useful tags are
Comments
< !--This is a comment -->
Lists
Unnumbered (bulleted) List -
<ul>. . .</ul> <li> required, </li> optional but preferred
Numbered (ordered) Lists -
<ol>. . .</ol>
Definition Lists -
<dl><dt>Term</dt> <dd>Definition</dd></dl>
(Indents the definition part.)Nested Lists -
<ul><ul>. . .</ul></ul>
Preformatted Text - <pre>. . .</pre>
(Lets you determine
spacing between words and lines without codes and displays the text in a fixed-width
font.)
Blockquote - <blockquote>. . .</blockquote>
(Indents
text in from both sides. Exact spacing of the indent is
determined by the browser.)
An example of lists
Add a list of quotations - use<ul>
and <blockquote>.
Copyright © Pierre Malraison All rights reserved.