More HTML Font Styles

Note: There HTML font styles discussed here (italics, bold, underline, teletype, strikethrough, subscript) are better off being created using Cascading Style Sheets (CSS). We know from the World Wide Web Consortium (W3C) that someday the underline and the strikethrough tag will not be used at all.

If you need a quick fix for an HTML styling problem see below. Otherwise, CSS is the preferred web styling technology and has been for years. If you are interested in CSS please see this beginner's article: CSS Tutorial.

Bold

Underline

Underlines text. Can be used for emphasis. Not recommended. Underlined text could be confused with a hyperlink.

Example HTML:<u>Underlined text</u>

In the browser it looks like:Underlined text

Teletype

Simulates the way text would look in a typewriter. The width of the space that each letter occupies is the same for each letter. Can be used, for example, to display HTML source code in a tutorial on a web page.

Example HTML:<tt>This is teletype text</tt>

In the browser it looks like:This is teletype text

Strikethrough

Creates text that looks like it's been crossed out. Can be used to show that something has changed, like the old price of a product.

Example HTML:<strike>$55.24</strike>

In the browser it looks like:$55.24

Subscript

Lowers the text and makes it smaller. Can be used to display chemical notation.

Example HTML:H<sub>2</sub>0

In the browser it looks like:H20

If you need a quick fix for an HTML styling situation you can use these tags. If you need to see the HTML code for font size, font face, or font color go here: HTML Font Styles.

Since you have made it all the way to the bottom of this page :-) I feel that I should tell you this: You should really be using CSS for any HTML styling.

When I first started building websites I used the HTML above to style my web pages. It worked at first. But using HTML for styling was very time consuming over the long haul.

Take a look at this CSS Example. You can see how CSS works in few minutes.