HTML Cookbook Basic HTML Course

It's Easy!

Alternate version

Text Decoration

There are some tags we can use to decorate text in web pages.

They are quite simple to use, so I will just show examples rather go into detail. There are some other tags that look the same, but imply some meaning. We will cover these in another post.

Decorative Tags

Bold text
<b>bold</b>: bold.

Italic text
<i>italic</i>: italic

Underlined Text
<u>underline</u>: underline

Teletype (typewriter or monospaced) Text
<tt>teletype</tt>: teletype

Strikethrough Text
<s>strike</s>: strike
<strike>strike</strike>: strike

Superscripted Text
super<sup>script</sup>: superscript

Subscripted Text
sub<sub>script</sub>: subscript

Math example: ƒ(x)n=ay2+by+c

These tags can be nested

Example

<b><i><u>
bold italic underlined text
</u></i></b>

looks like: bold italic underlined text.

Remember that some browsers only read one of these tags when they are nested. The one that shows on your page will be the innermost tag.

Happy coding!
Gnubee

Links
Tips
Tools
References
Rules
HTML Help Gnubee - Newsgroup
HTML Course Contents (Home)

Valid XHTML 1.0!

Valid CSS!