HTML Tags
Home Up

 

HTML Tags

 

Some HTML Coding Conventions

bulletHTML is the use of tags which tell a web browser, like Internet Explorere, what to do.  A tag is always enclosed within brackets: ‘<’ and ‘>’.
bulletA web browser looks for a “start” tag and continues the start tag’s function until it comes to an “end” tag.  “End” tags are created by adding a backslash (/) to the “start” tag at the point where the action is to end.
bulletThree tags are single tags: paragraph break <p>, line break <br>, and horizontal rule <hr>.  That means that you don’t need an “end” tag.  All other tags work in pairs.  Be sure to put an “end”  tag, otherwise the format will continue throughout the page.  For example if you want one word in blue, and you place a “start”  tag that tells the browser to change the font to blue, if you don’t end it, the rest of the page will be in blue.
bulletWhen using HTML, hitting the enter key to put a line break in won’t work; you must use an HTML tag to accomplish line breaks and paragraph breaks.  HTML also won’t recognize more than two consecutive spaces.
bulletHTML tags are not case-sensitive: that is, there no difference between upper case letters and lower case letters.

 

Tag Function

Tag

Example of tag in use

Result

Paragraph Break

(1 blank line between)

<p>

That dog is brown. <p> That dog is black.

That dog is brown.

 

That dog is black

Line Break

(no blank between)

<br>

That dog is brown. <br> That dog is black.

That dog is brown.

That dog is black

Horizontal Rule

(a plain line across the page AND a paragraph break)

<hr>

What follows is a horizontal rule.<hr> It also causes a paragraph break.

What follows is a horizontal rule.

It also causes a paragraph break.

Bold Text

<b>

</b>

This text <b> will be bold.</b> This will not.

This text will be bold. This will not.

Italic Text

<i>

</i>

This text <i> will be italicized. </i> This will not.

This text will be italicized.  This will not.

Underline Text

<u>

</u>

This text <u> will be underlined. </u> This will not.

This text will be underlined. This will not.

Centered

<p align="center"> </p>

<p align="center">This text is centered. </p>

This text is centered.

Combined Codes

Match pairs!

<b><i><u>

</b></i></u>

<u><b>This is busy, <i>busy</i> text.</u></b>

This is busy, busy text.

Hyperlink

<a href= >

</a>

Click <a href=http://www.lakeland.k12.nj.us>here </a> to go to Lakeland’s website

Click here to go to Lakeland’s web site

Bullet list

<ul>

<li>  </li>

</ul>

 

<ul>

  <li>Bullet Item 1</li>

  <li>Bullet Item 2</li>

  <li>Bullet Item 3</li>

</ul>

·   Bullet Item 1

·   Bullet Item 2

·   Bullet Item 3

Change the text color

Red, blue, yellow, purple, green, orange

<font color=  >
</font>

This text will be colored <font color=red> Orange. </font> This text will be colored <font color=blue>Green.</font>

This text will be colored Orange. This text will be colored Green.

 

©Copyright 2004-2010-In-Visions.net   All rights reserved.