Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Text Styles

  • You can also utilize a motley of styles that affect how your text will look. The following table reviews some of the more commonly used styles.

Opening Tag/Closing Tag Description
<ADDRESS>...</ADDRESS>
Used for address information usually at the bottom of the page.
<B>...</B> Makes the text bold between the tags
<BASEFONT>...</BASEFONT> Sets the default font size, color and font face such as
<BASEFONT = COLOR = "RED" FACE = "ARIAL" SIZE = "4">.
Is overridden by the <FONT> tag.
[1]
<BLINK>...</BLINK> Makes the text blink.[2]
<CITE>...</CITE> A quotation or a reference to another source
<CODE>...</CODE> Fixed width font used for displaying computer code
<EM>...</EM> Emphasizes the text, usually by making it italic.
<FONT>...</FONT> Changes the look of a font using the same parameters as <BASEFONT> above.[3]
<I>...</I> Makes the text italicized
<KBD>...</KBD> Indicates text to be entered by the user.
<LISTING>...</LISTING> Renders fixed-width font
<PRE>...</PRE>
Specifies pre-formatted text such as
	programming text.
	Creates a new block.
<SAMP>...</SAMP> Sample output from programs, scripts, etc.
<STRIKE>...</STRIKE> Puts a horizontal line through the text.[4]
<STRONG>...</STRONG> Logical style usually used to bold text.
<SUB>...</SUB> Displays subscripted text
<SUP>...</SUP> Displays superscripted text
<TT>...</TT> Displays monospaced text.
Can be displayed inline.
<U>...</U> Underline a bit of text.[5]
  • Consider the following bit of code that demonstrates the usage of these styles


<HTML>
<HEAD>
<TITLE>Styles</TITLE>
</HEAD>
<BODY>

<ADDRESS>
My Address
<BR>City, State Zip
</ADDRESS>

<B>This is bold font</B>
<BR><BLINK>This is blinking font</BLINK>
<BR><CITE>This is cited text</CITE>
<BR><CODE>This is code text</CODE>
<BR><EM>This is emphasized text</EM>
<BR><FONT FACE = "Modern" SIZE = "4" 
          COLOR = "red">Red, Size 4, Modern Font</FONT>
<BR><I>Italicized font</I>
<BR><B><I>Bolded and italicized font</I></B>
<BR><KBD>Keyboard Font</KBD>
<BR><LISTING>Listing font</LISTING>
<BR><PRE>Pre-formatted font</PRE>
<BR><SAMP>Sample Font</SAMP>
<BR><STRIKE>Strike through font</STRIKE>
<BR>H<SUB>2</SUB>0
<BR>e = mc <SUP>2</SUP>
<BR><U>Underlined Font</U>
<BR><XMP>Example Font</XMP>

</BODY>
</HTML>

  • The following figure shows what the previous code will look like when interpreted by a web browser

Additional Resources:

Text level elements - Character styles
Positioning Text
Introduction to Web Design | Table of Contents
Exercise Three


Up to => Home / Authoring / HTML / Tutorial




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers