|
CSS Home
CSS TutorialIntroductionCSS Advantages CSS Syntax Implementing CSS CSS Class CSS ID CSS Font CSS Text CSS Background Code CSS Border CSS Margin CSS Padding CSS Lists CSS Height & Width CSS Positioning CSS Float CSS Layers CSS Summary CSS CodesCSS AlignCSS bgcolor CSS Cellpadding CSS Cellspacing CSS Floating Menu CSS Hyperlinks CSS Leading Inline Style Sheets Embedded Style Sheets External Style Sheets CSS Scrollbars CSS Table Width CSS Print Version CSS Table-layout CSS ExamplesCSS ExamplesCSS Table-layout Example CSS ReferenceCSS Mini TutorialCSS Properties CSS Color Codes CSS Template CSS Media Types |
CSS TextApart from the various CSS font properties, there are other properties that can assist in styling your text. For example, you can change the color of text, align text, add decoration properties and more. In CSS, text can be styled using the properties listed below. Using this list, you can learn how to use each css text property and what it looks like in a browser. CSS Text Color
This results in: This CSS text color is olive CSS Text Align
This results in: This CSS text is aligned right CSS Text IndentIndents the first line of the paragraph.
<p style="text-indent:50px;">This text is indented by 50 pixels. What this means is that the first line of the paragraph will be indented by 50 pixels, but the following lines will not be indented. The text will need to wrap before you can see the indent - hence all this text!</p>
This results in: This text is indented by 50 pixels. What this means is that the first line of the paragraph will be indented by 50 pixels, but the following lines will not be indented. The text will need to wrap before you can see the indent - hence all this text! CSS Letter Spacing
This results in: This text has letter spacing applied CSS Word Spacing
This results in: This text has word spacing applied CSS Text Decoration
This results in: This text has a line over the top This text has a line through the middle This text has a line underneath This hyperlink has no underlineThis text is blinking CSS Text Transform
This results in: This text has been transformed to uppercase THIS TEXT HAS BEEN TRANSFORMED TO LOWERCASE this text has been capitalized. CSS Text Direction
<p style="direction:rtl;">This text is running from right to left. This can be useful for languages where the text runs from right to left. Not so useful for english though...</p>
This results in: This text is running from right to left. This can be useful for languages where the text runs from right to left. Not so useful for english though... CSS unicode-bidiUse this in conjunction with the direction property to determine the direction of the text. Possible values: normal, embed, bidi-override, and inherit.
<p style="direction:rtl;unicode-bidi:bidi-override;">This text is running from right to left. This can be useful for languages where the text runs from right to left. Not so useful for english though...</p>
This results in: This text is running from right to left. This can be useful for languages where the text runs from right to left. Not so useful for english though... CSS Text Shadow
<p style="text-shadow:4px 4px 8px blue;">If your browser supports the CSS text-shadow property, this text will have a shadow.</p>
This results in: If your browser supports the CSS text-shadow property, this text will have a shadow. CSS White SpaceTells the browser how to handle white space. Possible values: normal, pre, and nowrap.
This results in: This text has a line break and the white-space pre setting tells the browser to honor it just like the HTML pre tag. |
Need Website Content?
Get unique, quality digital content for your website.
|