HTML5, CSS3, and JavaScript Fourth Edition

(Ben Green) #1

CHAPTER 10. FONT FAMILIES 113


for the (C) copyright symbol?
Required Answer:©


Exam Question 202(p.348): What HTML character entity reference is
for the (R) registered-trademark symbol?
Required Answer:®


Exam Question 203(p.348): What HTML character entity reference is
for the TM nonregistered-trademark symbol?
Required Answer:™


10.8 Font and Text Attributes


We have talked a lot about fonts themselves. There are some other properties
you can use. For more information than is presented here, you can do a
Google search. It will turn up lots of examples.


text-shadow:was introduced in section 9.9 (page 95) and provides a way
to put a shadow behind your wording.


font-variant:can be normal or small-caps. You can cause your lower-case
lettering to be rendered as upper-case but smaller than full capital letters.


clip: can be used to hide part of the text. This is useful when the text
might be very long and you only want to display the first few inches of it.
See also overflow.


letter-spacing:lets you increase or decrease the distance between letters.
See also word-spacing.


line-height: controls the distance between baselines on successive rows of
text. A line height between 1.0 and 1.2 is considered normal. Sometimes
calledleading(pronounced led-ing).


overflow:controls what happens when content is too big to fit in the space
you have allocated for it. See also clip.


text-decoration: can be none, underline, overline, line-through, or blink.
(Please avoid blink. Users complain about it. Some browsers have actually
disabled it.)


text-indent:affects the first line of text in a paragraph.


text-transform:can be none, capitalize, uppercase, or lowercase.

Free download pdf