Basic Tags

<html></html>
Creates an HTML document. All Web pages are enclosed in this tag.

<head></head>
Contains  the title and other meta information that isn’t displayed on the Web page itself.

<body></body>
Contains the visible content of the Web document.

<!- COMMENT –>
Creates a comment. Comments are not show in the browser.

Text Tags

<hl></hl> to <h6></h6>
Creates a headline. The first headline would be h1 followed by the sub headline, h2 etc all the way down to h6.

<b></b>
Creates bold text.

<i></i>
Creates italic text.

<cite></cite>
Creates a citation, usually italic.

<tt></tt>
Creates teletype text. This text often looks like Typewriter Text.

<em></em>
Emphasizes a word, normally in italic. Better than using <i> for emphasis.

<strong></strong>
Emphasizes a word, normally in bold. Better than using <b> for emphasis.

<blockquote></blockquote>
Long quotation. Indents text.

<q></q>
Short quotation.

<abbr></abbr>
Abbreviation.

<pre></pre>
Creates preformatted text. Text in a pre tag is displayed in a fixed-width font, preserving both spaces and line breaks.

<acronym></acronym>
Acronym.

<dfn></dfn>
Definition.

<code></code>
Code. Often used to show programming code examples.

<cite></cite>
Citation.

<del></del>
Deleted text.

<ins></ins>
Inserted text.

<sub></sub>
Subscript.

<sup></sup>
Superscript.

Links

<a href=“URL”></a>
Creates a hyperlink.

<a href=“URL” target=“_blank”></a>
Creates a hyperlink that opens in a new windown.

<a href=“mailto:EMAIL”></a>
Creates a mailto link.

<a name=“NAME”></a>
Creates a target location within a document.

<a href=“#NAME”></a>
Links to that target location from elsewhere in the document

Formatting

<p></p>
Creates a paragraph.

<p align=“right”>
Aligns a paragraph to the left, right, or center.

<br />
Inserts a line break. Only use this when a <p> will not suffice.

<ul></ul>
Unordered list. Creates a bulleted list. Use <li> to list items.

<ol></ol>
Ordered list. Creates a numbered list. Use <li> to list items.

<li></li>
Encloses each list item.

<div></div>
A generic tag used to format blocks of HTML, also used with stylesheets.

<span></span>
A generic tag used for snippets of HTML. Used together with stylesheets.

<img src=“URL”>
Creates an image.

<img src =“URL” align=“left”>
Aligns an image: left, right, center; bottom, top, middle.

<img src=“URL” border=“1”>
Sets size of border around an image. Often set to “0” if used as a hyperlink.

<img src=“URL” alt=“ALTERNATIVE TEXT”>
Sets the alternative text of the image if it can’t be shown or viewed.

<hr />
Inserts a horizontal rule.

<hr size=“4” />
Sets height of rule.

<hr width=“75%” />
Sets width of rule, in percentage or absolute value.

<hr noshade />
Creates a rule without a shadow.

Tables

<table></table>
Creates a table.

<table border=“1”>
Sets width of border around table cells

<table cellspacing=“1”>
Sets amount of space between table cells

<table cellpadding=“1”>
Sets amount of space between a cell’s border and its contents

<table width=“500” or “75%”>
Sets width of table, in pixels or as a percentage of document width

<tr></tr>
Creates a row in a table.

<tr align=“left”> or <td align=“left”>
Sets alignment for cell(s) (left, center, or right)

<tr valign=“top”> or <td valign=“top”>
Sets vertical alignment for cell(s) (top, middle, or bottom).

<td></td>
Creates a cell in a row in a table.

<td colspan=“3”>
Sets number of columns a cell spans. Default=1.

<td rowspan=“3”>
Sets number of rows a cell spans. Default=1.

<td nowrap>
Prevents the lines within a cell from being broken to fit.

<th></th>
Same as <td> but used for headers. Often shown in bold and centred.

Forms

<form></form>
Creates the form.

<form action=“ADDRESS“>
Sets the target address for the form’s data.

<form method=“get“>
Sets the method for data transfer (get or post).

<select name=“NAME”></select>
Creates a pulldown menu. Encloses <option> menu items.

<option></option>
Creates a menu item embedded in a <select> pair.

<option value=”VALUE”>
Sets the value of the menu item.

<textarea name=“NAME” cols=30 rows=5></textarea >
Creates a text box. Cols set the width. Rows set the height.

<input type=“checkbox” name=“NAME”>
Creates a checkbox. Text follows tag.

<input type=“radio” name=“NAME” value=“VALUE”>
Creates a radio button.

<input name=“NAME” size=30>
Creates a one line text area. Size sets length in characters.

<input type=“submit” value=“NAME”>
Creates a Submit button.

<input type=“image” border=0 name=“NAME” src=“imagename.gif”>
Creates a Submit button using an image.

<input type=“reset”>
Creates a Reset button.

Leave a Reply