O'Reilly logo

Web Technology: Theory and Practice by M. Srinivasan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3.2 USING CSS

Style sheets are thus templates, containing rules on how to apply styles to content. An understanding of the Document Object Model (DOM) model will make usage of CSS clearer. There is a separate section on DOM as part of JavaScript and the reader is encouraged to refer both these sections in parallel, if required. However, the reader may choose to mull over the topic of CSS and then revisit this chapter after DOM has been covered.

There are three ways to associate styles with content. They are inline, embedded and linked. The last option is the ideal method that is recommended in the interest of best practices for web development.

Styles can be used along with HTML (recall that HTML is used interchangeably with XHTML), applied directly ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required