HOME

HTML Basic
HTML HOME
HTML & WWW
HTML Introduction
HTML Elements
HTML Basic Tags
HTML Formatting
HTML Entities
HTML Links
HTML Frames
HTML Tables
HTML Lists
HTML Forms
HTML Images
HTML Background

HTML Advanced
HTML Layout
HTML Fonts
HTML 4.0 Why
HTML Styles
HTML Head
HTML Meta
HTML URLs
HTML Scripts
HTML Webserver

Examples/Quiz
HTML Examples
HTML Quiz Test

References
HTML Quick List
HTML Tag List
HTML Attributes
HTML Events
HTML ASCII
HTML Entities
HTML Colors
HTML Colorvalues
HTML Colornames
HTML HTTP

Please visit our sponsors !

HTML Text Formatting

Previous Next

HTML defines a lot of elements for formatting output, like bold or italic text.

Below are a lot of examples that you can try out yourself:


Examples

Text formatting
This example demonstrates how you can format text in an HTML document.

Preformatted text
This example demonstrates how you can control the line breaks and spaces with the pre tag.

"Computer output" tags
This example demonstrates how different "computer output" tags will be displayed.

Address
This example demonstrates how to write an address in an HTML document.

Abbreviations and acronyms
This example demonstrates how to handle an abbreviation or an acronym.

Text direction
This example demonstrates how to change the text direction.

Quotations
This example demonstrates how to handle long and short quotations.

Deleted and inserted text
This example demonstrates how to mark a text that is deleted or inserted to a document.


How to View HTML Source

Have you ever seen a Web page and wondered "How do they do that?"

To find out, simply click on the VIEW option in your browsers toolbar and select SOURCE or PAGE SOURCE. This will open a window that shows you the actual HTML of the page.

Remember that you can save the source file, and use it as a template for your own Web pages.


Text Formatting Tags:

NN: Netscape, IE: Internet Explorer, W3C: Web Standard

Start Tag NN IE W3C Purpose
<b> 3.0 3.0 3.2 Defines bold text
<big> 3.0 3.0 3.2 Defines big text
<em> 3.0 3.0 3.2  Defines emphasized text 
<i> 3.0 3.0 3.2  Defines italic text
<small> 3.0 3.0 3.2 Defines small text
<strong> 3.0 3.0 3.2 Defines strong text
<sub> 3.0 3.0 3.2 Defines subscripted text
<sup> 3.0 3.0 3.2 Defines superscripted text
<ins>   4.0 4.0 Defines inserted text
<del>   4.0 4.0 Defines deleted text
<s>       Deprecated. Use <del> instead
<strike>       Deprecated. Use <del> instead
<u>       Deprecated. Use styles instead

"Computer Output" Tags:

Start Tag NN IE W3C Purpose
<code> 3.0 3.0 3.2 Defines computer code text
<kbd> 3.0 3.0 3.2 Defines keyboard text 
<samp> 3.0 3.0 3.2 Defines sample computer code
<tt> 3.0 3.0 3.2 Defines teletype text
<var> 3.0 3.0 3.2 Defines a variable
<pre> 3.0 3.0 3.2 Defines preformatted text
<listing>       Deprecated. Use <pre> instead
<plaintext>       Deprecated. Use <pre> instead
<xmp>       Deprecated. Use <pre> instead

Citations, Quotations, Definition Tags:

Start Tag NN IE W3C Purpose
<abbr>     4.0 Defines an abbreviation
<acronym>   4.0 4.0 Defines an acronym
<address> 4.0 4.0 3.2 Defines an address element
<bdo>     4.0 Defines the text direction
<blockquote> 3.0 3.0 3.2 Defines a long quotation
<q>   4.0 4.0 Defines a short quotation
<cite> 3.0 3.0 3.2 Defines a citation
<dfn>   3.0 3.2 Defines a definition term


Computer Joke

Customer: I don't have a '7' key.
Support: It's between the '6' and '8' key.
Customer: I don't have a '7' key.
Support: Do you see the '1' key?
Customer: Yes.
Support: What's to the right of that?
Customer: '2'
Support: And further right?
Customer: '3', '4', '5', '6'
Support: What's the next key?
Customer: '8'
Support: It should be to the left of the '8'
Customer: Oh, that '7' key?


Previous Next

Jump to: Top of Page or HOME or Printer Friendly Printer friendly page


Search W3Schools:


What Others Say About Us

Does the world know about us? Check out these places:

Dogpile Alta Vista MSN Google Excite Lycos Yahoo Ask Jeeves


We Help You For Free. You Can Help Us!


W3Schools is for training only. We do not warrant its correctness or its fitness for use. The risk of using it remains entirely with the user. While using this site, you agree to have read and accepted our terms of use and privacy policy.

Copyright 1999-2002 by Refsnes Data. All Rights Reserved


Validate How we converted to XHTML Validate

IISCart
ASP Ecommerce & Shopping Cart


Your own Web Site?

Read W3Schools
Hosting Tutorial



$15 Domain Name
Registration
Save $20 / year!



Advertise
at W3Schools

Only 0.5 CPM



SELECTED LINKS

University Online
Master Degree
Bachelor Degree


Web Software

The Future of
Web Development


Jobs and Careers

Web Security
Web Statistics
Web Standards


PARTNERS

W3Schools
TopXML
VisualBuilder
XMLPitstop
DevelopersDex
DevGuru
Programmers Heaven
The Code Project
Tek Tips Forum
ZVON.ORG
TopXML Search