You are currently using a web browser that does not support HTML 5 with style sheets. Please try the standard HTML 5, XHTML 1 or XHTML 1 Mobile version of this page instead.

CSS Properties

List of CSS Properties

The <text-decoration> Property
The <white-space> Property
HTML Color Code Chart
The <text-decoration> Property

The <text-decoration> property

Examples

<a style="text-decoration: none" ...>(hidden link)</a>
<span style="text-decoration: blink">blinky</span>
<span style="text-decoration: line-through">this got deleted</span>
<span style="text-decoration: overline">denominator</span>
<span style="text-decoration: underline">seriously</span>
a.nounderline {
text-decoration: none;
}
span.strikethrough {
text-decoration: line-through;
}
The <white-space> Property

The <white-space> property

The possible values of the white-space property are:

inherit
use the value of the white-space property from the style attribute coded on the current element's parent or inherited from one of its ancestors
normal
nowrap
pre
pre-line
pre-wrap

Examples

To prevent text from potentially wrapping at an inappropriate place, you can code the white-space: nowrap property. This example is an alternative to coding &nbsp; (non-breaking space).

<span style="white-space: nowrap">12:00 pm</span> is noon

Since HTML coders should avoid the deprecated <nobr> tag, you can include white-space: nowrap in a CSS file, and code <span> tags with class="nobr" instead:

<span class="nobr">12:00 am</span> is midnight
.nobr {
white-space: nowrap;
}

Last updated Sunday September 19, 2010


Printer-friendly PDF* format:

Index of CSS Properties

You are currently viewing this page in HTML 5 Style Sheet* format (* see Clicklets for more infomation). This document is also available in HTML 5 XML*HTML 5 non-XML*XHTML 1 Style Sheet*XHTML 1*XML* HTML 4* XHTML Mobile* WML Mobile* and printer-friendly PDF* formats. This is accomplished with Single Source Publishing, a content management system that uses templates in XSLT style sheets provided by XML Styles .com to transform the source content for various content delivery channels. There is also RDF* metadata that describes the content of this document.