Text

Text is styled using the following properties:

 

Property Description Value
color Specifies the colour of the text User defined
direction Specifies the text direction ltr (default)

rtl

letter-spacing Specifies spacing between characters User defined
word-spacing Specifies spacing between words User defined
text-indent Specifies indentation amount User defined
text-align Aligns the text Left, center, right, justify
text-decoration Specifies the decoration to be added underline, strikethrough, overline
text-transform Specifies whether to capitalise or convert to upper or lower case none, uppercase, lowercase, capitalize
white-space Specifies white space within an element normal, nowrap, pre, pre-line, pre-wrap
text-shadow Specifies text shadowing h-shadow px (*required)

v-shadow px (*required)

blur

color

vertical-align Specifies the vertical alignment of an element length

%

baseline

sub

super

top

text-top

middle

bottom

text-bottom

 

Save & refresh browser:

A red colored paragraph of text.

This text runs from right to left.

This paragraph's letters are spaced out by 10px.

This paragrpah's words are spaced out by 20px.

The first line of an indented parapgraph.

This text is right aligned.

This paragraph has been struck through!

THE TEXT IN THIS PARAGRAPH HAS BEEN TRANSFORM TO UPPERCASE.

The whitespace in this paragraph has been set to pre

and as you can see obeys the
same rules as the <pre> tag.

A red shadow has been applied to this text.

This paragraph contains this text which I've made appear above the rest of the bounding element.

Leave a Reply