Re: Can't find a bunch of stuff

Vidiot wrote:

> >Well, it seems your fear has come true - FONT is deprecated [3],
> >meaning it should _not_ be used anymore. Please consider improving
> >your skills on CSS [4] - trust me, your life will become much easier
> >after you've mastered just a bit of it! ;-)
>
> Oh, I know it is deprecated, which is why my web pages are not marked
> as strict :-)  For the life of me, I do not understand my the
> distaste for the FONT element.
>
> As seen by the example, I do use style sheets.  In some cases what
> you need to do does adhere to the KISS principle.  Making some text
> appear to vanish from the screen is very easily, and simply done,
> with FONT.  Whatever is done, there has to be something wrapped
> around the text.  In the examples, given, <STRONG> is available for
> creating a class to change the font color.  So, either I add a CLASS
> attribute to strong, or I enclose the text within <FONT>, the amount
> of text is all that much different.  Yes there a little more when
> done withing the HTML document itself.  Plus, you came "see" what you
> are wanting to do with the text right there in the HTML document. 
> With CSS, you have to open the stylesheet file and see what you were
> doing.  After time it would become 2nd nature to know that the class
> did.

Instead of the font element, you should use the span or div elements. 
The span element does exactly what you describe:
<span style="color: red; background-color: blue;">Some text that is 
coloured red on a blue background using CSS</span>

> Having to load a stylesheet brings up another point.  The load to the
> server to provide a page to a requestor has increased, as now you are
> not only sending out the HTML document, you are also having to send
> out the style sheet.  In some cases, it is possible that the style
> sheet could actually be larger than the HTML document (if the style
> sheet was written as a one sheet does all, which I certainly do not
> believe in.  KISS.  The point is that the internet is not a limitless
> resource in which one can just spit out bytes and bytes of data.

You can put the stylesheet directly in the head of your HTML document 
like this:
<head>
<style type="text/css">
  strong { color: red }
</style>
</head>

But if you use the same stylesheet on multiple pages, using an external 
stylesheet is often better, since browsers only have to request the 
stylesheet once even if the user looks at different documents that use 
this stylesheet.

> [...]
>
> Just so you don't think that FONT is the only element, there are many
> that I don't understand the need to deprecate.
>
> I think CENTER is another one.  Not sure why and not sure what it can
> be replace with in order to create a class.  Unless there is
> something that I am missing in my understanding of CSS, but CLASS has
> to be used with an element.  So, does this mean that I have to create
> a class called CENTER and then use it with an element like DIV?  Just
> what does that accomplish? The CENTER element is just 6 characters
> long.  Creating a CENTER class will require more chracters and to
> just use it will mean something like:
>
> 	<DIV CLASS="center">
>
> The character count just went from six to twelve.  What happened to
> KISS?

You could also use <div style="text-align: center">.

Greetings
Urs

Received on Tuesday, 24 June 2008 07:16:41 UTC