HTML Commands

HTML (HyperText Markup Language) contains of tags which are directives to the browser. Each tag tells the browser to display content in some format. HTML Tags are sometimes also referred to as HTML Commands.

Tags are contained between the < and > signs.

An example would be anchor tag which is <a>. Most of the tags are closed with a corresponding closing tag which comes between </ and >. Again, an example would be </a>.

Some tags don’t have a closing like a linebreak tag or horizontal rule tag. They are called self enclosed tags. Its a good practice to close such tags within the opening tag itself. Example would be <br /> or <hr />.

The basic syntax of  a tag is:

<TAG-NAME {ATTRIBUTE1{=”VALUE1″ …}}>TEXT CONTENT</TAG-NAME>

Below is a list of commonly used tags and their use:

Tags Use
HEADER
<head> The text within this tag specifies the header information for the HTML document.
<meta> Specifies information about this HTML page. This information is not displayed on the browser but may be used by search engines.
<title> The text within this tag specifies the title of the HTML document.
BODY
<body> The information within this tag is the body of the HTML document
TEXT FORMATTING
<h1>…<h6> The text within these tags are treated as headers.
<b> Bold the text within the tag.
<i> Italicize the text within the tag.
<u> Underline the text within the tag.
<br> Line break.
<p> New paragraph.
<font> Specify the font type, size, and color for the text within the tag.
<center> Center the text within the tag.
TABLES
<table> Signifies the presence of an HTML table.
<th> Specifies header properties in a table.
<tr> Specifies row properties in a table.
<td> Specifies column properties in a table.
BULLET LISTS
<ul> Unordered list, usually followed by one or more <li> tags.
<ol> Ordered list, usually followed by one or more <li> tags.
<li> Itemized list.
LINKS AND IMAGES
<a> Link.
<img> Specifies the image to be shown on the HTML document.
FRAMES
<frameset> Signifies that this HTML page is composed of frame(s).
<frame> Specifies the properties within each frame.

Leave a Reply