Monday, February 3, 2014

Use CSS to Pretty the Font

I learned a lot about formatting text from the book today.

So this is what it looks like with just the HTML, using my browser's (Google Chrome) default styles:



And after adding fonts, sizes, colors, and special text effects like this:

<style type="text/css">
body {
    font-family: Verdana, sans-serif;
    font-size: big;
}
h1 {
    font-size: 1.5em;
    font-variant: small-caps;
}
h2 {
    font: bold 1.2em Georgia, serf;
}
h1, h2 {color: purple; }

dt {
    font-weight: bold;
}
strong {
    font-size: italic;
}
.warning { color: red; }
</style>


It now looks like this!


That's not a lot of difference, but it's a good start to beauty!

No comments:

Post a Comment