SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 31 of 31
  1. #26
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Heh foobared my own example XD
    Completely missed the hashes in the ID attributes.

    I originally had the links in a ordered list but changed it because I felt it just made the example have a little too much chaos.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  2. #27
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,194
    Mentioned
    17 Post(s)
    Tagged
    5 Thread(s)
    rochow wrote:
    That's like making a header div just because. And making a footer div just because. Hell, let's just wrap everything in a div with some stupid ID that "describes it" just because. It is an absolute waste - it doesn't tell anybody anything that's not already extremely obvious (like wow, I'm on google.com, gee, lucky that ID is there I never would have figured that out otherwise!)
    I think your misunderstanding the point. This has nothing to do with any particular element, but all elements. I'm not saying everything should be wrapped inside in division. What I am saying is that it is appropriate to use as many id and class names as necessary on any element as long as they describe the content. Id and class names should not be thought of as styling hooks, but ways the describing the content. This methodology supports separation of structure and presentation and the former does not.

  3. #28
    SitePoint Addict rochow's Avatar
    Join Date
    Oct 2006
    Location
    Queensland, Australia
    Posts
    300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just because you *can* do something doesn't mean you *should*. For example, I *could* go jump in front of a car, that doesn't mean it's a good decision and something that *should* be done.

  4. #29
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by rochow View Post
    Just because you *can* do something doesn't mean you *should*. For example, I *could* go jump in front of a car, that doesn't mean it's a good decision and something that *should* be done.
    Semantics is the study of meaning in communication.

    I think this 'way' is more semantic.

  5. #30
    SitePoint Addict rochow's Avatar
    Join Date
    Oct 2006
    Location
    Queensland, Australia
    Posts
    300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I understand what you are saying. I was using that point as it is the same as what you are arguing (you can slap as many ID's and class's as you want and its a good thing)

    What I am saying is that it is appropriate to use as many id and class names as necessary on any element as long as they describe the content
    This is what I completely and utterly disagree with. Just because something can be done doesn't mean it should be done. Having an ID/class that isn't used for styling is a waste.

    Id and class names should not be thought of as styling hooks, but ways the describing the content.
    ID's and classes aren't used for anything but styling. This whole "relationship" rubbish only came about because they had to separate "content from presentation" and by naming the ID's and classes in relation to the content gives the illusion it's semantic. At the end of the day whether I call it "box", "adkaslkdnaldnla", "header" or whatever it does the same thing. It looks the same, it's read the same, it doesn't change the meaning of anything. If people couldn't read the source code, no-one would even know. I could send you two images of the same site, one named "semantically" and one not, and you couldn't tell them apart. So this whole "classes and ID's MUST describe the content else its not semantic" is a load of trifle - if it was true, you would be able to tell them apart no problems. I'm getting off topic, so bringing back to what you are saying, "Id and class names should not be thought of as styling hooks, but ways the describing the content." - no, that's what tags are for. They describe the content (such as <h1> - this is the main heading), the class/ID merely acts as a styling hook (this is the first one, so make it mega bold)

    I have a banana. I call it a banana - the Chinese guy says "no it's not, its a bowana" (or whatever). Than the Spanish guy says "not its not, its a yellow curve thing". No matter what it's called and for whatever reasons, it is the exact same thing that does the exact same thing.

  6. #31
    SitePoint Zealot Luke Morton's Avatar
    Join Date
    Jul 2005
    Location
    Essex, England.
    Posts
    125
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The reasons for which I added id="index-page" was to identify in the style the page to be index-page, and added a class www-site-com to define an overall style for the wrapper and define the sites URL to relate the document to the site. The div in the css is used as a wrapper to define the width and center the document. Therefore the div id not waste, even if you think defining relationships by using extra tags is waste, it still is useful in the style.
    Luke Morton
    UK Web Explorer| lukemorton.co.uk


Bookmarks

Posting Permissions

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