InfoSports - Youth Sports on the Web
Home » Commonly Used HTML Tags

Commonly Used HTML Tags

The first thing to remember about HTML tags is that most of them are used in pairs, ie., they have an opening and closing tag. Whenever you use a tag - say <blockquote> - you must also close it off with another tag - in this case, </blockquote>. Note the slash - / - before the word "blockquote"; is what distinguishes a closing tag from an opening tag. A few of the HTML tags (br p li image hr) do not need a closing tag. All HTML commands are enclosed in <> braces. These <> brace sequences are what the Internet browser uses in determining how a page should be displayed.

In the HTML tags listed below, items shown in green are HTML tags. While items in blue illustrate actual HTML coding with the results of that coding immediately below it. Unlike URLs, HTML tags may be entered in either upper or lower case (or a combination of upper and lower case).

HTML coding is used in the Article Text portion of your "Add Page" capability and in the HTML Block feature of "Remake Home Page".

Text Tags
center, h1 - h6, bold, italics, font, pre, tt, cite
Links
a mailto
Formatting
p, br, blockquote, ol, ul, li
Graphical Elements
img, hr
Tables
table, tr, td



Text Tags    Return to Top of Page
<center></center>
Centers a portion of text

<center>This text is centered</center>

This text is centered

<hl></hl> (h and the number one)
Creates the largest headline

<hl>Biggest Heading</hl>

Biggest Heading

Please note HTML tags can be combined. In this next example the center and the h1 tags are combined. Also, note that the closing HTML tags must be in the opposite order (work from inside out).
<center><hl>Biggest Heading Centered</hl></center>

Biggest Heading Centered


<h2></h2> (h and the number two)
Creates the next biggest headline. Heading Numbers range from 1 to 6. One is the largest and six is the smallest.

<h2>Next Biggest Heading</h2>

Next Biggest Heading


<h6></h6> (h and the number six)
Creates the smallest headline

<h6>Smallest Heading</h6>

Smallest Heading

<b></b>
Creates bold text

<b>Bold Print</b>
Bold Print


<i></i>
Creates italic text

<i>Italic Print</i>
Italic Print


<font size=?></font>
Sets size of font, from 1 to 7.

<font size=3>Example of size=3</font>
Example of size=3


<font color=?></font>
Sets font color, using name or hex value. Note that the color and size tags may be set into the same command.

<font color=red size=2>Red text size equal 2</font>
Red text size equal 2

<font color=#ff0000 size=2>Same using hex color codes</font>
Same using hex color codes


<pre></pre>
Preformatted text - For example the text is displayed the same way it is typed. Sometimes this is used to get text to align in columns. However, the table command (below) is a much better command to use to align text in columns.

<pre>

This is an example of the pre command.  When you use this command
type the text exactely as you wish it to appear.

Column 1   Column 2   Column 3
  item1      item2      item3
  item4      item5      item6
</pre>
<tt></tt>
Creates teletype, or typewriter-style text

<tt>This is an example of teletype text.</tt>
This is an example of teletype text.


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

<cite>This is an example of a citation.</cite>
This is an example of a citation.



Links    Return to Top of Page
<a href="URL"></a>
Creates a hyperlink.

The URL can be either of two formats.

  • If the link is to a page external to InfoSports then the link must be preceeded by http://. For example http://www.yahoo.com.
  • The http://www.infosports.com portion of the URL is omitted if you are linking to a page at InfoSports (or your own website). For example if the actual URL was http://www.infosports.com/example/images/mylink.htm, you would reference it as /example/images/mylink.htm.

A link to <a href="http://www.google.com">google.com</a>.
A link to google.com.


<a href="mailto:EMAIL"></a>
Creates a mailto link


Send an email to <a href="mailto:al.com">InfoSports</a>.

Send an email to InfoSports.



Formatting    Return to Top of Page
<p>
Creates a new paragraph. Inserts an extra line feed prior to the beginning of the text.
<p align=?>
Aligns a paragraph to the left, right, or center
<br>
Inserts a line break (line feed).
<blockquote>
</blockquote>

Indents text from both sides

<blockquote>This is an example of a blockquote.</blockquote>

This is an example of a blockquote.

<ol></ol>
Creates a numbered list

<ul></ul>
Creates a bulleted list

<li>
Precedes each list item, and adds a number

Numbered list.

<ol>
<li>Line 1.
<li>Line 2.
<li>Line 3.
</ol>

  1. Line 1.
  2. Line 2.
  3. Line 3.


Bulleted list.

<ul>
<li>Item 1.
<li>Item 2.
<li>Item 3.
</ul>

  • Item 1.
  • Item 2.
  • Item 3.


Graphical Elements    Return to Top of Page
<img src="URL">
Adds an image. Please note the URL is the same format as described in the link HTML command above.
<img src="URL" align=?>
Aligns an image: left, right, center; bottom, top, middle
<img src="URL" height=? width=?>
Aligns an image with the height and width set. Setting the height and width of the image allows the browser to load the page quicker since it knows before hand how much space to allocate to the image.
<img src="URL" border=?>
Sets size of border around an image

Insert the InfoSports logo and have it left aligned with no border and with height and width set.
Note: The align, height, width, and border tags are optional.

<img src="/images/logo.gif" height=60 width=312 align=left border=0>



<hr>
Inserts a horizontal rule
<hr size=?>
Sets size (height) of rule
<hr width=?>
Sets width of rule, in percentage or absolute value
<hr noshade>
Creates a rule without a shadow

Insert an unshaded ruler of height 4 and width 300.

<hr size=4 noshade width=300>




Tables    Return to Top of Page
<table></table>
Creates a table
<tr></tr>
Sets off each row in a table
<td></td>
Sets off each cell in a row
<th></th>
Sets off the table header (a normal cell with bold, centered text)

Table Attributes
<table border=#>
Sets width of border around table cells
<table cellspacing=#>
Sets amount of space between table cells
<table cellpadding=#>
Sets amount of space between a cell's border and its contents
<table width=# or %>
Sets width of table — in pixels or as a percentage of document width
<tr align=?> or <td align=?>
Sets alignment for cell(s) (left, center, or right)
<tr valign=?> or <td valign=?>
Sets vertical alignment for cell(s) (top, middle, or bottom)
<td colspan=#>
Sets number of columns a cell should span
<td rowspan=#>
Sets number of rows a cell should span (default=1)
<td nowrap>
Prevents the lines within a cell from being broken to fit

Example table... a simplified portion of the web site feature matrix.


<table width="80%" cellpadding="1" cellspacing="0" border="1" bgcolor="#ffffff">
<tr><td colspan=3 align=center bgcolor="#dfdfdf"><b>Youth Sports Website Feature Comparison</b></td></tr>
<tr bgcolor="#eeeeee" valign="center">
<td align=center width=40%><b>Feature</b></td>
<td align=middle>InfoSports<br>Premium</td>
<td align=middle>eteamz.com<br><b>Plus</b> with<br><b>No Ad Option</b><font size=1> (1)</font></td>
</tr>
<tr>
<td align="center"><b>Basic feature Set</b><br>Includes articles, page counter, page colors, fonts, ticker, links, special effects, contact info, announcements.</a></td>
<td align=middle ><img src="/i/happy.gif" width="23" height="23"></td>
<td align=middle ><img src="/i/happy.gif" width="23" height="23"></td>
</tr>
<tr><td colspan=3>
(1) Information obtained from public data on web site as of June 1, 2002.
</td></tr>
</table>

Youth Sports Website Feature Comparison
Feature InfoSports
Premium
eteamz.com
Plus with
No Ad Option (1)
Basic feature Set
Includes articles, page counter, page colors, fonts, ticker, links, special effects, contact info, announcements.
(1) Information obtained from public data on web site as of June 1, 2002.

Last Modified: July 15, 2007

InfoSports Network: InfoSports | iTeams.mobi | iTouchMap | GPA.me | MPGFacts | GetPicture.mobi | vPike
Copyright © InfoSports.com 1996-2009