Example - Specifying sizes
This is the default font size for a <p> element.
This h1 element has a font-size of 25px.
This container has its width set to 475px.
This h2 element has a font-size of 15px and a width of 50%(of the
container's width).
The following heading (h3) has a font-size of 36pt (1/2 inch).
36pt heading
This h4 element has a font-size of 2em.
This container has its font-size set to 2em.
This h5 element has a font-size of 0.5em (relative to the container's font-size).
Note: all the styles in this example have been set with an external style sheet sizes.css which contains the following set of styles:
h1
{
font-size: 25px;
}
div.demo
{
width:475px;
background-color: White;
}
h2
{
font-size: 15px;
width: 50%;
background-color: #ffffcc;
}
h3
{
font-size: 36pt;
}
h4
{
font-size: 2em;
}
div.demo#big
{
font-size: 2em;
}
h5
{
font-size: 0.5em;
}