Common HTML Tags

In HTML, you represent all special formatting with tags. Tags are delimited from the actual text by enclosing them in angle brackets: <>

Tags to Mark Text

Most tags in HTML apply to a span of text. For example, to make text bold, you can use the <b> tag. But you need an opening tag (before the text) and then a closing tag (after the text). The closing tag is just like the opening tag except that it has a forward slash after the first angle bracket. For example, we could type this sentence in HTML: One word in this line is <b>bold</b>, right? This sentence would appear in a browser as: "One word in this line is bold, right?"

Common tags that come in pairs include:

<b>something</b>
bold
<i>something</i>
italic
<u>something</u>
underlined
In most instances, however, logical tags are to be preferred:
<cite>something</cite>
citation
<em>something</em>
emphasis
<strong>something</strong>
strong emphasis
Six levels of headings are provided.
<h1>something</h1>
Heading 1 (for the most important level of headings)
<h2>
Heading 2 (for the next most important level of headings)
<h3>
Heading 1 (for the next most important level of headings)
etc.

Single Marks

These tags do not need a closing tag because they do not extend over more than one character.
<br>
line break
<p>
Paragraph (line break + blank line)
<hr>
Horizontal Rule

For More Information

Tags are described in detail in the NCSA's Beginner's Guide to HTML


Return to home page workshop

Last Modified: March 21, 1995

If you have suggestions for this web, please forward them to:

JavaScript is required to view this email address