molly.com

Sunday 27 February 2005

the meaning of semantics

WHAT IS MEANING? Check out my new article The Meaning of Semantics for beginning to intermediate readers at InformIT. Here’s a little sample:

Some of the elements we’ve misused are also some of markup’s most critical ones. Take the p element, which is used to denote paragraphs, and the br element, used to force a line break. Anyone ever commit this markup crime?

<p><br><br>

If you place the line above in a document between some text sections, you’ll get some white space, but the markup has absolutely no meaning. A paragraph tag should be used to denote a paragraph, period. A line break should be used to force a break in a line, not to gain white space.

I should be taken to markup prison and/or fined for having done this for years! Fortunately, I’ve got CSS by my side now, and can get back to cleaner living.

I know the InformIT site isn’t to everyone’s tastes because of the ads and so on, but hey, that’s how they’re able to pay their authors. So I hope you’ll brave it out, or if you just want to go right to the print-friendly page, which is free of ads, you can do that here.

Filed under:   standards, web design and development
Posted by:   Molly | 10:37 am |

57 Responses to “the meaning of semantics”

  1. Jonathan Snook Says:

    Good article. One quick note is the vague explanation of the address element. It should only be used to mark up contact information for a document as opposed to all addresses. HTMLHelp describes it well.

  2. Chris Says:

    Hi Molly,

    I’m Chris, this is my first comment on your blog :)

    I just read the article and do of course agree with what you say…and yes, of course I am guilty, too :)

    One thing which always strikes me when reading articles like yours, on CSS, on semantics, on validation (and yes, I religously believe in all of them) is: Why? This never gets explained. If there is a need to explain that semantics make sense, then there is also the need to eplain why. What for? How does it help me? Instead of just saying: Now we use CSS and therefore we’re just better people allround! :)

    For example, why would the next client I am trying to pull in care whether my markup is semantic or not? he doesn’t even know what mark up is! So I tell him: “I will create you page which validates, which is table-less, which has pure CSS for layout, which has semantic markup.”

    And he’ll say: “So what? Why is this interesting for me?”

    And I’ll say that I’ll mark up his headlines with

    etc, like in your example. And he’ll say: “So?”.

    However if I say: I will markup up your headlines because then Google will attach more wieght to the keywords in your headline and place you better/more correctly, then jhe will say: “Sounds like a plan”. And if I say that my validating pages will be more accessible and allow more users to vsisit his site he’ll agree that’s a good thing. And if I say that keeping my presentation logic separated from my content so that content is universally accessible, so that search engines can read it better, and that maintenance costs will go down, that his site will be more flexible and interoperable, that they can interact witth other applications and tools, people and websites and…and…and…at that moment he will intervene and say: “May I pay you double?”

    Well, ok, maybe not quite but you get the idea. I often find that we are bashing on what we consider deeply held beliefs because we know that they will make our products and the web as a whole better. But we often forget to mention that there are actually real reasons behind this which make sense not just to the web geek. And even some web geeks need convincing.

    Just saying it shouldbe like this is not enough in my opinion.

    Well, I wrote an entire article myself now…it’s just one of these things which have been bugging me again and again and it struck me when I read your article.

    www.maccaws.org has started a great project about all this, I’m sure you’re familiar with it.

    All the best

    Chris

  3. Naasson Says:

    Hi Molly. I haven’t commented for awhile…I visited your site yrs back…I honestly thought the design was more simple back then, being a designer myself. Honestly most of this stuff is over my head but I’m always open and willing to learn! I remember most of your posts were simple about your day too! My how complicated you’ve gotten! lol I wish you the best and hey, I’m gonna force myself to understand this stuff…someday…Take care!

  4. Dave M Says:

    Chris-

    Maybe before validation and accessibility, hit the client in the wallet and tell him how much bandwidth and therefore hosting costs you can save. I wonder if designers ever get a cut of bandwidth savings. Anyone?

  5. Chris Says:

    Dave, while I agree this is very true (of course I do, I want in on the profits! :) ) for most of my clients this is not an argument. They have bandwidth usage which falls nicely into most standard $7/month shared hosting and won’t notice the different in the wallet.

    I agree very much for large sites however. My hobby page (www.mameworld.net) gets around 50.000 hits over the whole domain, 12.000 or so on the front page. When I converted it from tag soup to XHTML and pure CSS the monthly bandwidth went down from $200 to $125. Quite a difference!

    Chris

  6. mattur Says:

    Hi Molly,

    The phrase “semantic markup” is a personal bugbear for me :-(

    Imagine this scenario: I hand you a piece of paper with a list on it, you ask me what it is, and I say, “It’s a list”. I then hand you a piece of paper with a couple of sentences written on it. You again ask what it is, and I say, “It’s a paragraph”.

    Do you have any idea what the list or the paragraph mean? Were my answers meaningful? Can you now process these pieces of information? “Ah…yes, a list, I file all my lists in the filing drawer labelled ‘lists’ and paragraphs go into the drawer below labelled ‘paragraphs’…” ;-)

    Or were my answers devoid of any meaning, simply describing the presentation of the information, without actually expressing what the list is a list of, or what the paragraph was a paragraph about?

    IMHO We have to get away from this deeply-misleading “semantic markup” label w.r.t (X)HTML. A better description is just “structural markup”: use the most appropriate document-structure tag available, if such a tag exists. If there isn’t an appropriate tag (e.g. document author) then… well, just make something up. Who cares that it creates a squillion different ways to markup an author’s name? No one would ever wish to search for other documents by the same author… would they?

    Clearly, we only have the most basic, presentation-related semantics (or perhaps more clearly, syntax) available to us in (X)HTML: this is a heading, this is a quote displayed as a block, this is a list, this is a paragraph… etc.

    Using the term “semantic markup” falsely associates document-/page-presentation markup with the Semantic Web (a web of information with well-defined meaning), and prompts endless, unproductive navel-gazing over what remains a profoundly-crude and limited syntax designed (badly) to markup academic papers. That the web is not used solely to publish academic papers is a testament to the ingenuity of webmasters, cheerfully forcing square pegs into round holes. It is certainly not a testament to the semantic richness of the tags available. We need semantic (i.e. meaningful) tags before we can start publishing semantic (X)HTML markup - assuming we want/need to do this at all.

  7. Dave Ferrick Says:

    Thank you very much for this article. I’ve been looking for just such articles describing the concepts of semantics and standards rather than laundry lists of “DOs and DO NOTs”. Referencing your own past mistakes also adds a friendly, familiar voice to the information. These help immensely in my training of my team on good web design practices.

  8. Keith Burgin Says:

    There is something to be said for the difference between selling “best practices” such as CSS and structural markup, and simply selling yourself and your abilities.

    If one of my customers would like a crash course in best practices, I’m happy to give them one. But most don’t care. They want to know that YOU will provide them with what they need, and that YOU will take care of how the site functions, and that YOU are looking out for their best interests.

    Frankly, once you have your customer’s trust and have properly sold yourself and your skill, the rest is usually moot.

    Just my opinion.

  9. Ben Warren Says:

    I agree that there’s really no need to use < br > within a < p > however the only time I do use this is in song lyrics / poets. They really need to be broken in specific places (which are not paragraphs).

    Example:-

    Verse Line 1
    Verse Line 2
    Verse Line 3

    Chorus Line 1
    Chorus Line 2
    Chorus Line 3

    This is the best way I can see going about this. Each line in the song is for sure not a paragraph and the lines need to break in a specific place.

    Maybe I’m missing something, anyone know a better solution?

  10. Dave Ferrick Says:

    Ben, maybe the pre tag would work there.

    Keith, I think you were replying to my comment. I agree 100%. I both work in-house for a company and freelance, and in both instances I try to use the best available practices at all times. It’s not a feature of my service, but my professional responsibility to understand and employ best practices. I’m hired to understand this stuff and not just implement. Unfortunately though, many still do see standards-based design as a line-item feature and abandon it based solely on the client’s concern. Frankly, clients will *never* be that interested in semantic mark-up. That’s why they’re clients.

  11. Jeff Hiles Says:

    Semantics and CSS for the Lovelorn

    I’m gonna sit right down and write myself a header,
    And make a style that’s color:blue.

    I’ll write some paragraphs so sweet.
    I’ll use the p tag. It’s so neat.

    Borders top and bottom.
    Remember “trouble” and you’ve got ‘em.

    Another style will say my line height’s looking better.
    An ordered list for ways I love you.

    I’m gonna sit right down and write myself a header,
    And make a style that’s color:blue.

  12. Charles Martin Says:

    I enjoyed reading your article and had a question in relation to your comments on the H1 element. You noted..

    An H1 signifies the most important heading on the page, H2 is a subheading of H1, and so on.

    However, you also pointed out that most professionals believe there should be only one H1 element within a document. You probably already see where I’m going. What of the TITLE element? Does this not actually define what the document contains? Here is what the W3C spec on HTML 4.01 has to say about the title element:

    Authors should use the TITLE element to identify the contents of a document. Since users often consult documents out of context, authors should provide context-rich titles. Thus, instead of a title such as “Introduction”, which doesn’t provide much contextual background, authors should supply a title such as “Introduction to Medieval Bee-Keeping” instead.

    It would seem to me the TITLE element already does what “most professionals” deem to be the purpose of the H1 element. What’s your thoughts on this?

  13. Douglas Clifton Says:

    Not fair, stealing my article titles!

    lol, doug

  14. Dave Ferrick Says:

    Charles, that’s a good question and it struck me as well. After sniffing around however, I found a very unsatisfying explanation of the relationship between h1 and title.

    http://www.w3.org/QA/Tips/Use_h1_for_Title

    If it is part of a collection, for example a section on Dogs in a collection of pages about pets, then the top level heading should assume a certain amount of context; just write

    Dogs

    while the title should work in any context: Dogs - Your Guide to Pets.

    This example tasks the title to carry 2 levels of information: page information (the h1) and collection information. Unfortunately, the W3C does not delve into the semantic value of title, instead attributing its value mechanisms removed from the document (http://www.w3.org/QA/Tips/good-titles).

  15. susie Says:

    I just can’t believe that someone wrote a CSS poem based on a big band song.

  16. zaxbypass » Blog Archive » Warning: Contents under pressure Says:

    […] In this, my line of work, I’m often, not the responsible one in regards to what is referred to as “the content”. For me that content is simple, Lorem ipsum. For me, I’ve got to know how and where the content may harm the structure. Something about proactive design and semantics comes into play here, but I’ve lost my train. […]

  17. wieght loss Says:

    wieght loss wieght loss

  18. pump Says:

    http://www.sh-scpv.com/ pump
    http://www.sh-scpv.com/ china pump

  19. ScrewPumps Says:

    http://www.sh-scpv.com/Diaphragm-Pumps.html Diaphragm Pumps
    http://www.sh-scpv.com/Screw-Pumps.html Screw Pumps

  20. David Says:

    Do you want increase your pagerank?

  21. David Says:

    Visit:

    http://www.increasemypagerank.com

  22. David Says:

    And if you want increase traffic:

    http://www.trafficfyweb.com
    http://www.linksfyweb.com

    Regards!

  23. gltkgzozzl Says:

    Hello! Good Site! Thanks you! cuachefkkuo

  24. David Says:

    Two news ideas:

    http://www.buylinkstoincreasepagerank.com
    http://www.buytargetedwebsitetraffic.com

  25. David Says:

    And other:

    http://www.buylinkdirectory.com
    http://www.buytargetedwebsitetraffic.com

  26. David Says:

    http://www.buytextlinkdirectory.com

  27. Juan Says:

    Good site an good ideas. Thanks!

  28. Peter Says:

    Good idea!

    Thanks!

  29. Peter Says:

    I think the same!

  30. Pr Link Says:

    Pr Link

  31. Felipe Says:

    Interesting conclusions.

  32. Felipe Says:

    http://www.incrementarpagerank.com
    http://www.comprarenlacestexto.com

    Can be interesting sites.

    Regards!

  33. Peter Says:

    Goods urls!

  34. The Muse Says:

    Yup, guilty as sin myself.

  35. iddaa Says:

    Love your beatiful

    http://www.hostingtescil.net
    http://www.evideoizle.com

    broccoli isn’t so bad as long as you know how to cook it.

  36. enerji Says:

    http://www.sanalgecit.com

  37. http://www.hikayeyaz.com Says:

    thanks all

  38. sex Says:

    YES : Keith, I think you were replying to my comment. I agree 100%. I both work in-house for a company and freelance, and in both instances I try to use the best available practices at all times. It’s not a feature of my service, but my professional responsibility to understand and employ best practices. I’m hired to understand this stuff and not just implement. Unfortunately though, many still do see standards-based design as a line-item feature and abandon it based solely on the client’s concern. Frankly, clients will *never* be that interested in semantic mark-up. That’s why they’re clients. hikayeyaz.com :(

  39. hikayeler Says:

    seo the tkansl :D

  40. hikaye Says:

    THNAKS ALLL VERY GOOD PAGES!

  41. Emre Says:

    Molly, tell, when are you going to decide where to live? We are all checking back now and then to see where fate or whim or Aşk Sevgi luck has taken you

  42. Alanya Says:

    To a good first approximation, Obama seems to be the sort of nominee you’re looking for

  43. firefox indir Says:

    thanks

  44. kavak yelleri Says:

    For example, why would the next client I am trying to pull in care whether my markup is semantic or not? he doesn’t even know what mark up is! So I tell him: “I will create you page which validates, which is table-less, which has pure CSS for layout, which has semantic markup.”

  45. bruce Says:

    it is easy to find it, i think u just search on google or yahoo

  46. evden eve Says:

    but, i think it is another thing which you have

  47. universal trade Says:

    i like it

  48. trade Says:

    interesting, thanks

  49. surucu kursu Says:

    do you know everything about css?

  50. belediye Says:

    how can i find everything about css?

  51. ticaret odasi Says:

    what do you want to learn about css? we can help easily

  52. milliyet Says:

    i want learn too, i want start at the beginning of css

  53. umit Says:

    it is good t see u

  54. uygar Says:

    thats the matter i want to learn

  55. sanayi odasi Says:

    ok,thanks

  56. fikralar Says:

    hi, umit. how is going on

  57. html kodları Says:

    thanks

Leave a Reply

Elsewhere

Roll Roll Roll