HTML and CSS Reference
In-Depth Information
TExT-iNdENT
he text-indent property does just what you expect: It indents the irst line
of text in a paragraph or other block element. It can take either an absolute
length or a percentage. Negative values are permitted and cause the text to be
outdented. Here are some examples:
h2 { text-indent: -2em; }
main p { text-indent: 1%; }
#t1 td { text-index: .25in; }
TExT-Tr ANSForM
his property provides a means to control the case of an element's text. he
permissible values are uppercase , lowercase , capitalize , none , and inherit .
he property can be applied to any body element. It is a useful tool for deal-
ing with listings and menus generated by blogging sotware or other content-
management systems. For example, you can display the same marked-up list
of links as uppercase in a menu bar at the top of the page, but with smaller
lowercase letters in the page footer.
LiNE-HEiGHT
he principal use of the line-height property is to control how far apart the
lines are in a paragraph or other block element, but there are subtle aspects to
its efects. he height of a line is the minimum distance from its baseline to the
baseline of the line just above it. hat is usually set at 1.2 times the font size of
the line's tallest character, but it is only a minimum value; no maximum value
is implied. hus, each line in a block of text can have a diferent line height.
Because the normal behavior is to calculate the line height from the font size, it
is common to specify the line-height property using a relative unit. For example:
#content p { line-height: 1.6em; }
ul.page-list li { line-height: 180%; }
he diference between what the browser calculates for the height of a
line and the line's maximum computed font size is called “leading” and is
pronounced like the metal that plumbers once used. Half of the leading is
added above the characters on each line, and half goes below. If the leading is
negative, as can happen when working with absolute values in pixels, points,
 
 
 
 
Search WWH ::




Custom Search