W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > April to June 2005

RE: Inline Style Sheet Question

From: Beheler Kim <beheler_kim@bah.com>
Date: Thu, 7 Apr 2005 21:04:20 -0400
Message-ID: <CD6921F5E4AC7842B574B14C4E48A8CB4E3AE9@MCLNEXVS03.resource.ds.bah.com>
To: "Harry Woodrow" <harrry@upnaway.com>, <w3c-wai-ig@w3.org>
I thought that using Color to convey information would be something
like...

All text in Red indicates a negative value.  $5.00

 

In my case you have the text "* indicates a required field" at the top
of the page and the * would be the reason it is not just color conveying
the information.  Someone please correct me if I am wrong.

 

 

 

-----Original Message-----
From: Harry Woodrow [mailto:harrry@upnaway.com] 
Sent: Thursday, April 07, 2005 8:57 PM
To: Beheler Kim; w3c-wai-ig@w3.org
Subject: RE: Inline Style Sheet Question

 

Remember not to use Colour alone to provide information.

 

 

Regards  

Harry Woodrow

 

-----Original Message-----

From: w3c-wai-ig-request@w3.org [mailto:w3c-wai-ig-request@w3.org] On
Behalf

Of Beheler Kim

Sent: Friday, 8 April 2005 8:40 AM

To: w3c-wai-ig@w3.org

Subject: RE: Inline Style Sheet Question

 

 

Thanks for everyone's feedback. I guess I should've given more of an

explanation of why I wanted to use different colors. I have a sentence

that says: "* indicates a required field", where the * will be red.

Throughout the page (and web site) the * will be next to required form

elements.  I will either use the <strong> or <em> tag to format the *.  

 

Thanks again for all of the responses.  

 

 

    

 

-----Original Message-----

From: w3c-wai-ig-request@w3.org [mailto:w3c-wai-ig-request@w3.org] On

Behalf Of David Woolley

Sent: Thursday, April 07, 2005 6:06 PM

To: w3c-wai-ig@w3.org

Subject: Re: Inline Style Sheet Question

 

 

> 

> Sorry this may be my lack of knowledge on style sheets, but what if

> there is one word in the paragraph that needs to have a different

style?

 

That depends on why it needs to have a different style.  In most cases

you will make it into an appropriate inline element, e.g. strong, em, 

cite, etc.  If there really is no standard element, first consider

whether

the styling is gratuitous, and if not use a span element.

 

> But by default the <p> tag creates a break after the closing </p>. So

if

 

A p element contains a paragraph, it should not be used purely for its

styling effects.

 

P {

      Color: red;

}

P EM {

      Font-weight: bold;

}

 

<p>here is my <em>paragraph</em>.</p>

 

> I understand that I could use a <span> tag around the word

'paragraph'.

 

You can't use a tag around anything, but you can use an element.

 

> But how would I use the style sheet if it is an abuse of style sheets

to

> create my own class (ex. .red)?

 

The abuses are in:

 

- using span when there is a more specific inline element;

 

- naming classes after the intended presentation, rather than what that

  presentation signifies.

 

If you replaced red by danger, you might have a valid use of span, but

you would first have to be sure that it would not be better to use

<strong class="danger">.....</strong>, or similarly with em.

 

 

 

-- 

No virus found in this incoming message.

Checked by AVG Anti-Virus.

Version: 7.0.308 / Virus Database: 266.9.5 - Release Date: 7/04/2005

 

 

-- 

No virus found in this outgoing message.

Checked by AVG Anti-Virus.

Version: 7.0.308 / Virus Database: 266.9.5 - Release Date: 7/04/2005

 

 
Received on Friday, 8 April 2005 01:04:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 19 July 2011 18:14:21 GMT