Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSS Text Text properties allow you to control the appearance of text. It is possible to change the color of a text, increase or decrease the space between.

Similar presentations


Presentation on theme: "CSS Text Text properties allow you to control the appearance of text. It is possible to change the color of a text, increase or decrease the space between."— Presentation transcript:

1

2 CSS Text Text properties allow you to control the appearance of text. It is possible to change the color of a text, increase or decrease the space between characters in a text, align a text, decorate a text, indent the first line in a text, and more.

3 The color property The color property sets the color of a text. Inherited: Yes

4 Example body { color: rgb(255,255,0) }

5 Possible Values ValueDescriptionNNIE colorThe color value can be a color name (red), a rgb value (rgb(255,0,0)), or a hex number (#ff0000). 4.03.0

6 Browser Notes Note in Internet Explorer 3.0: This property does not work with form fields Note in Netscape 4.x: This property does not work with form fields, dt, dd, hr, or table elements

7 The Direction Property The direction property sets the text direction. Inherited: Yes

8 Example div { direction: rtl }

9 Possible Values

10 ValueDescriptionNNIE ltrText direction is left-to-right rtlText direction is right-to-left

11 Letter-Spacing Property The letter-spacing property increases or decreases the white space between characters. Inherited: Yes Note: Negative values are allowed.

12 Example p { letter-spacing: 12px } p { letter-spacing: -0.5px }

13 Possible Values ValueDescriptionNNIE norma l Defines normal space between characters 6.04.0 lengthDefines a fixed space between characters 6.04.0

14 Text-Align Property The text-align property aligns the text in an element. Inherited: Yes

15 Example p { text-align: center }

16 Possible Values ValueDescriptionNNIE leftAligns the text to the left 4.03.0 rightAligns the text to the right4.03.0 centerCenters the text4.03.0 justify4.0

17 Text-Decoration Property The text-decoration property decorates the text. Inherited: No Note: The color of the decoration should be set by the "color" property.

18 Example p { text-decoration: underline }

19 Possible Values ValuesDescriptionNNIE noneDefines a normal text4.03.0 underlin e Defines a line under the text4.03.0 overlineDefines a line over the text6.04.0 line- through Defines a line through the text 4.03.0 blinkDefines a blinking text4.0

20 Text-Indent Property The text-indent indents the first line of text in an element. Inherited: Yes Note: Negative values are allowed. The first line will be indented to the left if the value is negative.

21 Example p { text-indent: 20px } p { text-indent: -12px }

22 Possible Values ValueDescriptionNNIE lengt h Defines a fixed indentation4.03.0 %Defines an indentation in % of the width of the parent element 4.03.0

23 Text-Transform Property The text-transform property controls the letters in an element. Inherited: Yes

24 Example p { text-transform: uppercase }

25 Possible Values ValueDescriptionNNIE noneDefines normal text, with lower case letters and capital letters 4.0 capitalizeEach word in a text starts with a capital letter 4.0 uppercaseDefines only capital letters4.0 lowercaseDefines no capital letters, only lower case letters 4.0


Download ppt "CSS Text Text properties allow you to control the appearance of text. It is possible to change the color of a text, increase or decrease the space between."

Similar presentations


Ads by Google