Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Feb 2006
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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.

  • #2
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    • 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.

  • #3
    New Coder
    Join Date
    Feb 2006
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Very well then..
    Thank you!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •