Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day

(singke) #1
ptg16476052

156 LESSON 7: Formatting Text with HTML and CSS


TABLE 7.3 CSS Properties from Lesson 7
Property Use/Values
text-decoration Specifies which sort of decoration should be applied to the text. The
values are underline, overline, line-through, blink, and none.
font-style Specifies whether text should be italicized. The three values are
normal, italic, and oblique.
font-weight Specifies the degree to which text should be emboldened. Options are
normal, bold, bolder, lighter, and 100 to 900.
font-family Enables you to specify the font used for text. You can choose families
such as serif, sans serif, and monospace, or specific font names. You
can also specify more than one font or font family.
font-variant Sets the font variant to normal or small-caps.
font-size Enables you to specify the font size in any unit supported by CSS.

Workshop


Here you are at the close of this lesson (a long one!) and facing yet another workshop.
This lesson covered a lot of ground, so I’ll try to keep the questions easy. There are
a couple of exercises that focus on building some additional pages for your website.
Ready?

Q&A


Q If line breaks appear in HTML, can I also do page breaks?
A HTML doesn’t have a page break tag. Consider what the term page means in a web
document. If each document on the web is a single page, the only way to produce a
page break is to split your HTML document into separate files and link them.
Even within a single document, browsers have no concept of a page; each HTML
document simply scrolls by continuously. If you consider a single screen a page,
you still can’t have what results in a page break in HTML. The screen size in each
browser is different. It’s based on not only the browser itself, but also the size of
the monitor on which it runs, the number of lines defined, the font currently being
used, and other factors that you cannot control from HTML.
When you’re designing your web pages, don’t get too hung up on the concept of a
page the way it exists in paper documents. Remember, HTML’s strength is its flex-
ibility for multiple kinds of systems and formats. Instead, think in terms of creating
small chunks of information and how they link together to form a complete presen-
tation.
Free download pdf