Sie sind auf Seite 1von 2

14-03.

Summary of some HTML Tags1

Structure Tags

<html> ... </html> Encloses the entire HTML document.


<head> ... </head> Encloses the head of the HTML document (i.e. the title tag, etc.).
<title> text </title>
Indicates the title of the document. This appears in the title bar
of the browser and is the name used when a user bookmarks the
page; it does not display in the actual text area of the browser
itself.
<base href="url"> Contains the URL or address of the current page. It allows you to
easily use relative links (also included in the header area).
<body> ... </body> Encloses the body (text and tags) of the HTML document. A
optional format of this tag sets the background color:
<body bgcolor="#RRGGBB">.

Headings

<h1> text </h1> A first-level heading. (Most often used as the title which does
appear in the document).
<h2> text </h2> A second-level heading.
<h3> text </h3> A third-level heading.
<h4> text </h4> A fourth-level heading.
<h5> text </h5> A fifth-level heading.
<h6> text </h6> A sixth-level heading.

Paragraphs

<p> text </p> Indicates a paragraph.


<blockquote>
text paragraphs
</blockquote> Indents a block of text.

Character Formatting - Logical Highlighting

<strong> text </strong>


Strong emphasis. (Usually displays as bold).
<em> text </em> Emphasis. (Usually displays as italics).
<cite> text </cite> A small citation reference.
<code> text </code> A selection of typed computer code (i.e. fixed width font).

Character Formatting - Physical Highlighting

<b> text </b> Boldfaced text.


<i> text </i> Italicized text.

1
This is a sample crib sheet. Its a good idea to make your own, expanding it as we go through the
semester.
14-03.2

<u> text </u> Underlined text. (Can be confused with links which are
displayed as underlined text).

Changing Font Size


<font size="value"> text </font>
Changes the size of the font without using a heading tag.
Enter a value between "-2" and "+6".
Example: <font size="+2">text</font>.

Other Elements
<hr> A horizontal rule/line. Often referred to as a shadow rule.
<br> A line break.
<!-- text --> A comment. This text does not appear in the browser.

Lists

<ol> ... </ol> An ordered (numbered) list. Precede all items on the list with the
<li> tag. Specify starting number by adding start=#. Specify bullet
type by adding type= followed by one of: "1 a A i I".
<ul> ... </ul> An unordered (bulleted) list. Specify bullet type by adding
type= followed by one of "disk square circle".
<li> text A list item: for use inside <ol> or <ul>.
<dl> ... </dl> A definition or glossary list enclosing the <dt> and <dd> tags.
<dt> text </dt> A definition term: for use inside <dl>.
<dd> text </dd> The corresponding definition to each <dt> term as a part of a
definition list.

Links
<a options> text </a> Contains the information defining the location of the link.
Options are:
href="url"
href="#name"
name="name"
Use "url" to link to another document or "#name" to link to an
anchor (i.e. a named location). Use "name" to create an anchor
which can then be linked to. Do not use spaces in "name".
Examples:
<a href="#LocationPointers">Go to Pointers</a>
<a name="LocationPointers">Pointers</a>
<a href="http://www.queensu.ca">Click here to go to the Queens
Home Page</a>
To create an email link:
<a href="mailto:name@insert.address.here">Click here to email me!</a>
To create an email link with a specified subject:
<a href="mailto:name@insert.address.here?subject=Request for more
information">Click here to request more info</a>

Das könnte Ihnen auch gefallen