Menu
Text Features

There is a series of html tags that you can use to configure features of your text like boldness, italics, strike though, underline, and more.

Bold Text

To make text bold in html, simply place the <b> tag before and the </b> after any text you want to appear bold. Shown below is an example of use of the html bold text tag.

<p>This text is normal <b>this text is bold</b> this text is normal.</p>

This text is normal this text is bold this text is normal.

The <strong> tag does exactly the same thing. Because the specification for the strong tag is not exact, I would not recommend its use.

Italic Text

To make text italic in html, simply place the <i> tag before and the </i> after any text you want to appear italic. Shown below is an example of use of the html italic text tag.

<p>This text is normal <i>this text is italic</i> this text is normal.</p>

This text is normal this text is italic this text is normal.

The <em> tag does exactly the same thing. Because the specification for the em ag is not exact, I would not recommend its use.

Strike Through Text

To put a line through text in html, simply place the <strike> tag before and the </strike> after any text you want a line through. Shown below is an example of use of the html strike text tag.

<p>This text is normal <strike>this text is struck out</strike> this text is normal.</p>

This text is normal this text is struck out this text is normal

The <del> tag does exactly the same thing. Because the specification for the del tag is not exact, I would not recommend its use.

Subscript Text

A subscript is a number, letter, or symbol written directly next to and slightly below a word or phrase that can be used to reference the word or phrase to a footnote. A subscript is also used in chemistry to indicate the number of atoms of an element in a molecule. To create a subscript, use the <sub></sub> tag, as shown below.

<p>The chemical formula for water is H<sub>2</sub>O, and the formula for Hydrogen Peroxide is H<sub>2</sub>O<sub>2</sub>.</p>

The chemical formula for water is H2O, and the formula for Hydrogen Peroxide is H2O2.

Superscript Text

A superscript is a number, letter, or symbol written directly next to and slightly above a a number, letter, or symbol. A superscript is frequently used in mathematics to indicate and exponent. To create a superscript, use the <sup></sup> tag, as shown below.

<p>Mass and energy are related as defined by Einstein's formula E=mC<sup>2</sup>, where energy (E) is equal to the mass (m) multiplied by the speed of light (C) squared.</p>

Mass and energy are related as defined by Einstein's formula E=mC2, where energy (E) is equal to the mass (m) multiplied by the speed of light (C) squared.

Teletype Text

Shown below is an example of use of the html <teletype> text tag, which produces monospaced text.

<p>This text is normal <tt>this text is monospaced</tt> this text is normal.</p>

This text is normal this text is monospaced this text is normal.

Teletype text simulates text created by the old mechanical teletype machine. It's often used to indicate computer code, keyboard text, or text returned by a computer.

Underlined Text

To put a line under text in html, simply place the <u> tag before and the </u> after any text you want underlined. Shown below is an example of use of the html u text tag.

<p>This text is normal <u>this text is underlined</u> this text is normal.</p>

This text is normal this text is underlined this text is normal.

I do not recommend using the html underline tag because Web users tend to mistake underlined text for links. They'll be clicking on our underlined text and think you have a bad link.

The <ins> tag does exactly the same thing. Because the specification for the ins tag is not exact, I would not recommend its use.


Learn more at amazon.com

More HTML Code:
• The HTML BODY tag
• What is HTML?
• HTML Select List Basics
• Using col and colgroup to Apply Attributes to a Table Column
• Checkbox Basics
• Changing the Size of an Image on Your Webpage
• HTML Textarea Basics
• Semantic (X)HTML: Markup with Meaning
• Set Form Controls Tab Order With tabindex Attribute
• HTML center Tag