Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-25-2008, 05:46 PM   PM User | #1
Shadowfox
New Coder

 
Join Date: Feb 2006
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Shadowfox is an unknown quantity at this point
Question Please clarify: Does a CSS "display:table;" affect semantics?

Hello all!

This thread is explicitly about:

Does the "display:table;" CSS attribute to a DIV element affect the way search engines "see" the content?

No, it does not:
Quote:
Originally Posted by rmedek
No, the only thing that affects the semantics of a document is the HTML, not the CSS. So, making a <div> have display:table or a <table> have display:block won't affect the HTML at all.

That's one reason why display:table is available in the first place—to give elements the visual behavior of a table while allowing the proper element to be used for good semantics.


Why even post this thread after such a clear answer?
Quote:
Originally Posted by Mystere(from another board)
[...] display:table creates a semantic state in which you create tables that aren't really tables. There's no tabulation going on. Yes, this helps with screen readers and such that look at the semantic markup of the HTML, but such devices are becoming more and more intelligent and are starting to look at CSS as well.

see article
Would you advice a person, willing to comply with semantics rules, to not use "display: table;" if he has another alternative?
Thank you!


To Whom It May Concern:
Yes, this thread seems quite similar to one I posted a few hours ago. What I believe, is that the redefinition of the title and content of the thread justifies some "repetitions"

Last edited by Shadowfox; 02-25-2008 at 05:50 PM..
Shadowfox is offline   Reply With Quote
Old 02-25-2008, 05:57 PM   PM User | #2
rmedek
Senior Coder

 
Join Date: Nov 2003
Location: Minneapolis, MN
Posts: 2,879
Thanks: 2
Thanked 65 Times in 56 Posts
rmedek is on a distinguished road
  • Does a red coffee mug make it any less a coffee mug than a blue one?
  • Does a <div> with display:table make it any less a <div> than one with display:block?

If the content is a table, use a table.
If the content belongs in a division of the page, or you need a non-semantic, block-level element to provide a style hook, use a div.

If you are viewing a page with no stylesheets applied, no amount of display:anything is going to affect your document.
__________________
drums | web
rmedek is offline   Reply With Quote
Old 02-25-2008, 06:50 PM   PM User | #3
Shadowfox
New Coder

 
Join Date: Feb 2006
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Shadowfox is an unknown quantity at this point
Very well then..
Thank you!
Shadowfox is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:59 PM.


Advertisement
Log in to turn off these ads.