Chapter 7. FORMATTING THE TEXT ON YOUR PAGE

Get Started with Cascading Style Sheets

Cascading Style Sheets (CSS) give you much greater control over the presentation and formatting of your page. Style rules can be placed in embedded styles directly within a Web page, or in external style sheets, which is discussed in Chapter 9. To create an embedded style sheet, you need to add a style tag block to the head of the document. The tag will take one required attribute, type, which must be set to a value of text/css.

Within the tag block, you will create your style rules. Each rule will consist of a selector. There are many types of selectors that you can use; this chapter looks at the most basic of those: the element selector. An element selector is ...

Get HTML, XHTML, and CSS: Your visual blueprint™ for designing effective Web pages now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.