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.3 SAMPLE CSS FILE

Shown in Figure 3.2 is a sample CSS file that is generic. The CSS applies from top to bottom.

 

A snippet from a sample CSS file

 

Fig. 3.2 A snippet from a sample CSS file

 

It is related to the HTML tags in the sense that the style definitions apply to a particular tag. For example the <body> tag is styled as per the body style definition described in the CSS file. Likewise, all content within <p> tags in the HTML file will follow that defined by the style within “p { …}” in the CSS file.

In addition to the tag, there could be classes or “id”s in the HTML file that can relate to the CSS style definitions. In an HTML page each “id” attribute is unique; ...

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