Home >Web Front-end >CSS Tutorial >What are the css text attributes?
css text attributes: 1. margin paragraph spacing; 2. [text-align] text centering; 3. [text-indent] paragraph indent; 4. [text-decoration] set text decoration effect; 5 , [line-height] sets the paragraph line height.
The operating environment of this tutorial: windows10 system, css3 version, DELL G3 computer. This method is suitable for all brands of computers.
css text properties:
1. CSS text properties: conversion of uppercase and lowercase letters in text—text-transform
Attribute value:
uppercase;(all uppercase)
lowercase;(all lowercase)
Capitalize; (in all lowercase words, the first letter is capitalized)
p{text-transform:uppercase;}
2. CSS text attribute text centering——text-align
Attribute value:
center; (centered)
left; (left aligned)
Right (right alignment)
p{text-align:center;}
3. Paragraph indentation of css text attributes—text-indent
em (so The unit is words), ± can be used
p{text-indent:3em;}
4. Set the text decoration effect of css text attributes——text-decoration
Attribute value:
none(remove underline)
underline(underline)
a{text-decoration:none;}5. Setting the paragraph line height of css text attributes—
-line-height
a{line-height:13px;}6. Setting the word spacing of css text attributes Word-spacing (only useful for English) Letter-spacing (both Chinese and English are acceptable)
p{letter-spacing:16px;}7. Paragraph spacing of css text properties-
margin
p{margin:66px;}8. CSS text properties of Border——
border
p{border:3pxlightgreensolid;}9. CSS text attribute space——
white-space
p{white-space:pre;}10. Setting the input method status of css text attributes-
ime-mode
Recommended (free): css video tutorial
The above is the detailed content of What are the css text attributes?. For more information, please follow other related articles on the PHP Chinese website!