This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > July 2004 > How to apply a style without using <font>?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to apply a style without using <font>?
Louis.

2004-07-25, 12:15 pm

Hi all,

One can connect a CSS style to a HTML tag. I want to create a text in
the style footer. I can do:

<font class="footer">Here is my great footer.</font>

However, the <font> tag is depreciated in HTML 4.0 and I would like to
stick to the rules as much as possible. I tried to create my own tag
(see below), but that did not work. I do not want to use <p> or
<table> in this case.

<footer>Here is my great footer.</footer>

What can I do?

Thank you in advance,
Louis.


Please post to this newsgroup, email may not reach me.





Terry Kimpling

2004-07-25, 12:15 pm

Louis. wrote:
> Hi all,
>
> One can connect a CSS style to a HTML tag. I want to create a text in
> the style footer. I can do:
>
> <font class="footer">Here is my great footer.</font>
>
> However, the <font> tag is depreciated in HTML 4.0 and I would like to
> stick to the rules as much as possible. I tried to create my own tag
> (see below), but that did not work. I do not want to use <p> or
> <table> in this case.
>
> <footer>Here is my great footer.</footer>
>

Why not <p class="footer">???</p> The styling for class="footer" can be
placed after the <p> styling in the css file and override everything
declared.

--
TK
www.wejuggle2.com
Still Having a Ball




-----= Posted via codecomments.com, Uncensored Usenet News =-----
http://www.codecomments.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Steve Pugh

2004-07-25, 12:15 pm

Louis. <louis@despammed.com> wrote:

>One can connect a CSS style to a HTML tag. I want to create a text in
>the style footer. I can do:
>
><font class="footer">Here is my great footer.</font>
>
>However, the <font> tag is depreciated in HTML 4.0


deprecated not depreciated, though it is that as well.

> and I would like to
>stick to the rules as much as possible. I tried to create my own tag
>(see below), but that did not work. I do not want to use <p> or
><table> in this case.


What is the footer? It's probably not a paragraph or a table so <p> or
<table> would indeed be poor choices. Is it a division of your page?
In that case the <div> element would make the most sense.
However, as straight replacement for <font> the <span> element is
simplest.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <steve@pugh.net> <http://steve.pugh.net/>
Stan Brown

2004-07-25, 12:15 pm

"Louis." <louis@despammed.com> wrote in
comp.infosystems.www.authoring.stylesheets:
>One can connect a CSS style to a HTML tag. I want to create a text in
>the style footer. I can do:
>
><font class="footer">Here is my great footer.</font>
>
>However, the <font> tag is depreciated in HTML 4.0 and I would like to
>stick to the rules as much as possible.


"span" and "div" are the tags you want. Use "span" for text level
(in the middle of a paragraph, say) and "div" for block level.

If you have a footer then probably it's outside the normal text flow
and you want
<div class="footer">I use Dr.Scholl's.</div>
I have a class "key" for key words and phrases, so I might wrote
something like
<p>When your statistical test fails to reject H<sub>o</sub>,
you must write your conclusion in <span class="key">neutral
language</span>.</p>

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Stan Brown

2004-07-25, 12:15 pm

"Stan Brown" <the_stan_brown@fastmail.fm> wrote in
comp.infosystems.www.authoring.stylesheets:
>"span" and "div" are the tags you want. Use "span" for text level
>(in the middle of a paragraph, say) and "div" for block level.


I should add that you use "span" and "div" when no other tag is more
appropriate. For instance, <font> is wildly inappropriate to mark a
footer. <p> might make sense, but if the footer is multiple
paragraphs then you'd need to wrap all of them in a <div>.

But in my example
> <p>When your statistical test fails to reject H<sub>o</sub>,
> you must write your conclusion in <span class="key">neutral
> language</span>.</p>


it could be as good -- maybe better -- to use the "strong" tag since
any browser will then show some emphasis:

<p>When your statistical test fails to reject H<sub>o</sub>,
you must write your conclusion in <strong class="key">neutral
language</strong>.</p>

And in fact that's what I actually do. I was trying to keep things
simple in my earlier note.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Lars Eighner

2004-07-25, 12:15 pm

In our last episode,
<0097g0pip1uqg3jkqi26tqc67l8kupvmrn@4ax.com>,
the lovely and talented Louis
broadcast on comp.infosystems.www.authoring.stylesheets:

> Hi all,


> One can connect a CSS style to a HTML tag. I want to create a text in
> the style footer. I can do:


><font class="footer">Here is my great footer.</font>


> However, the <font> tag is depreciated in HTML 4.0 and I would like to
> stick to the rules as much as possible. I tried to create my own tag
> (see below), but that did not work. I do not want to use <p> or
><table> in this case.


><footer>Here is my great footer.</footer>


> What can I do?


Use <span> or if you mean it to be a block element, use <div>


--
Lars Eighner -finger for geek code- eighner@io.com http://www.io.com/~eighner/
If it wasn't for muscle spasms, I wouldn't get any exercise at all.
Louis.

2004-07-25, 12:15 pm

Thank you kindly. I did not know about span and div. I looked into it
and started using it. Works great.

Louis.

On Sun, 25 Jul 2004 08:58:12 -0400, Stan Brown
<the_stan_brown@fastmail.fm> wrote:

>"Stan Brown" <the_stan_brown@fastmail.fm> wrote in
>comp.infosystems.www.authoring.stylesheets:
>
>I should add that you use "span" and "div" when no other tag is more
>appropriate. For instance, <font> is wildly inappropriate to mark a
>footer. <p> might make sense, but if the footer is multiple
>paragraphs then you'd need to wrap all of them in a <div>.
>
>But in my example
>
>it could be as good -- maybe better -- to use the "strong" tag since
>any browser will then show some emphasis:
>
> <p>When your statistical test fails to reject H<sub>o</sub>,
> you must write your conclusion in <strong class="key">neutral
> language</strong>.</p>
>
>And in fact that's what I actually do. I was trying to keep things
>simple in my earlier note.


Christoph Paeper

2004-07-25, 12:15 pm

*Louis.* <louis@despammed.com>:
>
> One can connect a CSS style to a HTML tag.


No.

> I tried to create my own tag


Funny what people try to do instead of reading up on the matter.

> I do not want to use <p> or <table> in this case.


Depending on what your footer contains, 'address' may be the most
appropriate element. Anyway, why do you post such a mark-up question to
ciwas instead of ciwah?

> Please post to this newsgroup,


Sure, who would do differently?

--
Save the whales, eat more dolphins!
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews