PROWAREtech








Cascading Style Sheets: Tutorial - Page 04
Formatting Text
Text can be aligned to the left, right, center or justify. These are self explanatory. To center a header:
Heading Centered
Text can have a shadow added to it. For text shadow use the text-shadow
property:
Document Heading
Document Heading
Document Heading
Document Heading
Do not allow breaks in white space by using the white-space
property.
Turn off the italicizing nature of HTML elements like <em>
and <i>
using
the font-style
property. For example:
This is emphasised text with italics turned off.
Similarly, turn on italicizing for HTML elements like headers (<h1>
, <h2>
,
<h3>
, etc.)
This heading is italic
To turn off bolding of, for example, HTML header elements, which are always bold by default:
This heading is not bold
Use the text-decoration
property to overline, underline and strike text.
This text is highly decorated.
Capitalizing, lowercase and uppercase are all set by the
text-transform
property. For example:
<p style="text-transform:capitalize;">this text is capitalized</p>
<p style="text-transform:lowercase;">THIS TEXT IS LOWERCASE</p>
<p style="text-transform:uppercase;">this text is uppercase</p>
this text is capitalized
THIS TEXT IS LOWERCASE
this text is uppercase
For small caps effect use the font-variant
property.
This Text Is Small Caps