Tags Defined Tips

Read these 21 Tags Defined Tips tips to make your life smarter, better, faster and wiser. Each tip is approved by our Editors and created by expert writers so great we call them Gurus. LifeTips is the place to go when you need to know about Html tips and hundreds of other topics.

Tags Defined Tips has been rated 3.1 out of 5 based on 1142 ratings and 2 user reviews.
How do I use subscript in HTML?

Subscript <SUB> ...</SUB>


Definition:

Specifies that the enclosed text should be rendered in subscript, slightly lower than the surrounding text.

Attributes:

None.

Suggested Usage:

Best used for scientific or mathmatical notations. Also used for footnotes.

Example:

Directly under the U.S. Federal Government<SUB>12</SUB> you see a start tag.

   
How do I use the Base tag?

Base <BASE>


Definition:

Establishes the URL basis for subsequent references in link and anchor statements in the document body.

Attributes:

TARGET="window" ; HREF="URL".

Suggested Usage:

This tag is legal only within the <HEAD> tag. Complex, multipage sites will benefit by using this tag because it helps maintain the integrity of a site by specifically defining the common portion of every resources URL.

Example:

<BASE HREF="http://www.html-tips.com">

   
What is a meta tag?

Meta <META>


Definition:

Used within the <HEAD> element to embed information about information in a document. This information can be extracted by servers/clients and be used in identifying, indexing, and cateloging document information.

Attributes:

NAME="text" ; CONTENT="text" ; HTTP-EQUIV="text" ; SCHEME="schemename".

Suggested Usage:

The biggest use of meta tags grant access to spiders and robots for automatic indexing in search engines.

Example:

<META NAME="description" CONTENT="Your site's description would go here">

   
How do I use the head tag?

Head <HEAD> ... </HEAD>


Definition:

Defines information about an HTML document, including meta information, page title, links to other documents, and index information.

Attributes:

Profile="URL".

Suggested Usage:

Although many browsers will render an HTML document without one, <HEAD> ... </HEAD> is required. It's also a good idea if you want to include information for search engines or to establish a base URL.

Example:

<HEAD> This is where you would put your title tag, meta tags, and base tag. </HEAD>

   
How do I use superscript in HTML?

Superscript <SUP> ... </SUP>


Definition:

Specifies that the enclosed text should be rendered in superscript, slightly higher than surrounding text.

Attributes:

None.

Suggested Usage:

Especially useful when working with foreign languages and names. Also for scientific and mathmatical notation.

Example:

Navigation Listing<SUP>NEW</SUP>

   
How do I place a web page element centered?

Center <CENTER> ... </CENTER>


Definition:

Indicates that the enclosed text should be centered in the browser window.

Attributes:

None.

Suggested Usage:

Not used much anymore. Similar style sheet properties and the attribute have taken its place.

Example:

This table will appear in the center of the browser:

<CENTER>

<TABLE>

<TR><TD></TD></TR>

</TABLE>

</CENTER>


   
How do I use the title tag?

Title <TITLE> ... </TITLE>


Definition:

Encloses the document's title, which appears in the title bar of the browser window.

Attributes:

None.

Suggested Usage:

Using a short, descriptive title should be placed on every HTML document you author. An accurate, descriptive title will also help many search engines and tools find your content.

Example:

<TITLE>HTML Tips, Tricks, and Source Code for Webpage Authors.</TITLE>

   
How do I use the comment tag?

Comments <!-- ... -->


Definition:

Indicates a comment; The browser will ignore all text within the tag elements.

Suggested Usage:

The comment tag allows the webpage author to insert notes, dates, and anything else that will be helpful to the author and others who view the code after publication. You can also use the code to temporarily remove sections of a document simply by adding a comment tag pair around the removed text.

Example:

<!-- Last check for broken links was 17 Jan 2001 -->

   
How do I use the font tag?

Font <FONT> ... </FONT>


Definition:

Defines the appearance of enclosed text.

Attributes:

COLOR="(#RRGGBB|colorname)" ; FACE="name(, name2(,name3))" ; SIZE="number".

Suggested Usage:

The FONT tag is being used less and less in favor of style sheets rules. When you specify a font face, keep in mind that if the user doesn't have that particular font installed on thier machine, they will see the system default instead.

Example:

<FONT SIZE="2" FACE="Arial, Helvetica" COLOR="red">

   
How do I make text look like it´s from a typewriter?

Teletype Text <TT> ... </TT>


Definition:

Encloses text to be displayed in a monospaced font, usually a variety of Courier.

Attributes:

None.

Suggested Usage:

Use when character position is critical or when trying to imitate typewriter output.

Example:

<TT>This is Teletype Text.</TT>

This is Teletype Text.


   
How do I use an anchor tag?

Anchor <A> ... </A>


Definition:

Provides a clickable link to another webpage or a specific point within a document.

Attributes:

ACCESSKEY="TEXT" ; CHARSET="TEXT" ; COORDS="X1,Y1,X2,Y2,ETC.." ; HREF="URL" ; NAME="TEXT" ; REL="TEXT" ; REV="TEXT" ; SHAPE="(RECT|CIRCLE|POLY|DEFAULT)" ; TABINDEX="NUMBER" ; TARGET="WINDOW".

Suggested usage:

Anchors should be the innermost elements in nested markup. However, you cannot nest anchors within other anchors. A closing tag is required.

Example:

<A HREF="http://www.html-tips.com" target="_blank">Html-Tips.com</A>

   
What is a tag attribute?

Common Attributes

In an effort to avoid redundancy, I'll list here the 6 most common tag attributes (more than 85% of html tags list these attributes). These attributes all have default values, which means that you don't have to list them unless you want to change thier values.

ID="NAME" - Document-wide identifier that can be used to give an HTML element a unique identifier within a document.

CLASS="TEXT" - A list of class names (seperated by commas), that indicates that the element belongs to a specific class or classes of style definitions.

STYLE="TEXT" - Provides rendering information specific to this element.

TITLE="TEXT" - Defines an advisory title that will display additional help.

DIR="(LTR|RTL)" - Indicates the direction that the text will be read, Left to Right or Right to Left.

LANG="NAME" - Specifies the language that the element and its content are written in.

   
How do I format a paragraph in HTML?

Paragraph <P> ... </P>


Definition:

Defines paragraph boundries for normal text. A line break and carriage return occurs when this tag is placed.

Attributes:

ALIGN="(LEFT|CENTER|RIGHT|JUSTIFY)"

Suggested Usage:

For good writing style use paragraphs to break the flow of ideas or information into related chunks. Easier formatting than using line breaks. The closing tag(</P>) is optional.

Example:

<P your paragraph content here. Instead of using the line break tag to force a carriage return, use the paragraph tag to control the entire paragraph.</P>

   
How do I use strikethrough style?

Strikethrough <S> ...</S>


Definition:

Displays enclosed text in strikethrough style. This tag is the same as <STRIKE>.

Attributes:

None.

Suggested Usage:

Use this tag only when necessary as the text produced on screen is difficult to read. Most commonly used to show text removed from earlier versions of a document.

Example:

<S>Strikethrough</S>

   
How do I use the HTML tag?

HTML <HTML> ... </HTML>


Definition:

Encloses an entire HTML document as the outermost layer of its structure.

Attributes:

VERSION="URL"

Suggested Usage:

The HTML tag should go around the entire document.

Example:

<HTML>Logically your HEAD tag would be next followed by the rest of your document, before</HTML>

   
What can I learn in the HTML tag definitions category?

Category Overview

In this category I'm going to try to accomplish familiarizing you with HTML tags. With each tip I'll provide the tag definition (taken from the HTML 4.0 DTD), legal attributes for the tag (required attributes shall be indicated by red text), suggested usage of the tag, and finally, an example of the tag using some attributes together.

Using this section as a reference will grant you greater flexibility when designing your webpage as well as bring out the creative genius in us all.

I won't provide attribute definitions because there are simply too many. However, if you want a definition for a particular tags attribute, don't hesitate to write and ask me

   
How do I add an image to my webpage?

Inline Image <IMG>


Definition:

Used to place graphics within a page. Supplies source, placement, and behavior information.

Attributes:

ALT="text" ;|RIGHT|TOP|MIDDLE|BOTTOM)" ; BORDER="number" ; HEIGHT="number" ; WIDTH="number" ; HSPACE="number" ; ISMAP ; SRC="URL" ; USEMAP="map-name" ; VSPACE="number".

Suggested Usage:

Use graphics sparingly! Don't build your site around images, let the images enhance your site.

Example:

<IMG SRC="http://www.yoursite.com/yourimage.gif" WIDTH="468" HEIGHT="60" ALT="Please visit my site">

   
How do I use a horizontal rule?

Horizontal Rule <HR> ... </HR>


Definition:

Draws a horizontal rule accros the page.

Attributes:

ALIGN="(LEFT|CENTER|RIGHT)" ; NOSHADE ; SIZE="number" ; WIDTH="(number|%)"

Suggested Usage:

The horizontal rule is best used to emphasize natural divisions between text items or topics, or to seperate a header or footer from the body of a document.

Example:

<HR SIZE="3" WIDTH="75%">

   
How do I use the body tag?

Body <BODY> ... </BODY>


Definition:

Identifies and completely encloses the contents of an HTML document's body.

Attributes:

TEXT="(#RRGGBB|COLORNAME)" ; LINK="(#RRGGBB|COLORNAME)" ; VLINK="(#RRGGBB|COLORNAME)" ; ALINK="(#RRGGBB|COLORNAME)" ; BGCOLOR="(#RRGGBB|COLORNAME)" ; BACKGROUND="URL".

Suggested Usage:

There's really only one use; To define the body of an HTML document. Required for strictly interpreted HTML.

Example:

<BODY TEXT="#000000" LINK="BLUE" ALINK="GREEN" VLINK="RED" BGCOLOR="#FFFFFF">Contents of your page will be here</BODY>

   
How do I underline text with HTML?

Underline <U> ... </U>


Definition:

Enclosed text will be underlined.

Attributes:

None.

Suggested Usage:

Try to steer clear of this tag. Users may confuse underlines with hyperlinks. For emphasis, use the italics tag.

Example:

<U>Underlined Text</U>

   
How do I use the bold tag?

Bold <B> ... </B>


Definition:

Indicates that the enclosed text is boldface type.

Attributes:

This tag has no attributes.

Suggested Usage:

Use this tag to provide focus or emphasis on a word or phrase of text.

Example:

<B>This is boldface type</B>

   
Not finding the advice and tips you need on this Html Tip Site? Request a Tip Now!


Guru Spotlight
Susan Sayour