HTML and CSS Reference
In-Depth Information
<h3>Class Selectors</h3>
<p>A <dfn>class selector</dfn> applies style rules to elements that have the equivalent
<code>class</code> attribute in their opening HTML tag. For example, the <code>.warning</code>
class selector applies to all elements that have <code>class="warning</code>" in the opening
tag.</p>
</div>
</body>
When viewed in a browser,
basic.html
looks like Figure
2-3
. The browser adds some default styles, such as
underlining links and displaying unvisited links in blue and visited ones in purple. Most browsers display the text
in the
<abbr>
tags with a dotted underline, italicize the text in
<dfn>
tags, and use a monospaced font for the text
in
<code>
tags.
■
Browsers that use the WebKit rendering engine, such as safari and google Chrome, don't display
<dfn>
elements in italic. Checking the default styling of HTMl elements is one of the major challenges of Css.
Note
Figure 2-3.
The page before custom styles have been applied