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;}
-line-height
a{line-height:13px;}
p{letter-spacing:16px;}
margin
p{margin:66px;}
border
p{border:3pxlightgreensolid;}
white-space
p{white-space:pre;}
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!