On Wed, 8 Sep 2010, Lalena wrote:
Hi all,
Pardon my elementary question. I'm going through all my ancient web pages to
make them compatible with current coding rules. And I've discovered that
"font size" is no longer a valid tag. Is there something that replaces it, so
I don't have to establish styles for everything?
Use HTML for mark up the structure of the page and CSS to adjust the
appearance.
If not, is it possible to establish a default style for all text, without the
text having to reside inside a <p> or <h> or any other kind of tag like that
in the html pages? Or do you have to put a tag around every bit of text to
have any control over it?
I currently have this, but isn't it for hyperlinks only?:
a {font-family:Times,serif;
font-size:medium;
color:#ffffff;
}
You can set default font for the entire page in the BODY:
body
{
font-size: 100%; /* don't use anything else for the default */
font-weight: normal;
font-family: helvetica, arial, sans-serif;
}
Then I was wondering how to establish secondary text styles, like if I want a
slightly larger type size for a particular line, but don't want it boldfaced,
as in a <h> tag. (I know I'd have to put tags around these, just don't know
what kind.)
You can use, for example, a DIV, or a P with a class:
<p class="whatever">Some text here</p>
CSS:
.whatever
{
font-size: 110%;
}
--
Chris F.A. Johnson, <http://cfajohnson.com>
Author:
Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/