HTML and CSS Reference
In-Depth Information
1.
html {
2.
font: italic small-caps bold 14px/22px "Helvetica Neue",
Helvetica, Arial, sans-serif;
3.
}
Font Properties All Together
Let's take a look at an example that uses all these
font
-based properties together. The fol-
lowing HTML and CSS demonstrates the different possibilities when styling text; the final
result of this code can be seen in
Figure 6.1
.
Figure 6.1
A sample blog post teaser using font-based properties
HTML
1.
<h2><a href="#">I Am a Builder</a></h2>
2.
3.
<p class="byline">Posted by Shay Howe</p>
4.
5.
<p>Every day I see designers and developers working alongside one
another. They work intelligently in pursuit of business objectives.
They work diligently making exceptional products. They solve real
problems and take pride in their work. They are builders. <a
href="#">Continue…</a></p>
CSS
1.
h2,
2.
p {
3.
color: #555;
4.
font: 13px/20px "Helvetica Neue", Helvetica, Arial, sans-serif;
5.
}
6.
a {
7.
color: #648880;
8.
}
9.
a:hover {
Search WWH ::
Custom Search