Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17
  1. #1
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Is the <hr /> tag ever semantic? It is used to separate parts of the document (and abused to render lines instead), but a header tag usually does that. On the upside, when viewing a page with CSS off or on a device that doesn't support CSS, <hr /> tags make the page far more accessible (readable).

    Thoughts?
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,717
    Member #
    5580
    Liked
    718 times
    i don't know how relavent this is, but XHTML2 will
    have the <separator> tag.

    http://www.w3.org/TR/xhtml2/mod-structural.html

    That will make <hr> obsolete?


  4. #3
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Yeah. That basically sounds like a renaming of the hr tag.

    A reasonable alternative, I think, would be a div tag with the `separator' class, which has the appropriate height, border, etc, settings. But the downside of that one is that it doesn't work without CSS. On the other hand, you could do this:
    Code:
    <div class="separator">=============================================</div>
    And style that with a [minicode]overflow: hidden;[/minicode] and other relevant properties, so that it does show up even in no-CSS situations.

  5. #4
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    A little off the topic of the initial question, I think "Semantic HTML" is the silliest thing ever. HTML was not designed to be a semantic language, it was designed to be a presentation language. It's my belief that XML - either standardized (RSS) or proprietary (custom CMS format) should be used for "semantic" purposes, then translated by XSL-T to form XHTML for the purpose of presentation, until such a time as browsers are capable of rendering and presenting any XML document (which should be the ultimate goal), at which point HTML would be completely obsolete, in which case further discussion of "semantic" HTML are just pedantic. :-D

  6. #5
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    HTML was always designed to be semantic. Presentational elements were hacked in.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  7. #6
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    I'm not so sure about that. "Header", "paragraph", "strong", "table", "horizontal rule" all define presentation elements. Even if they define them semantically, they're presentation only, and have no relationship to underlying data at all.

  8. #7
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Markup != presentation. In any meaning of the word. In fact, many of the markup languages I know of (be they SGML derivatives, XML derivatives, or TeX derivatives) are largely structural. Admittedly, CSS is also a markup language, and is purely presentational.

    Take Docbook (an SGML derivative, recently turned into an XML derivative, since XML is really a subset) or LaTeX as an example. Now, TeX is Turing-complete, so you actually do manage presentation in TeX macros, as well; however, the purpose of LaTeX is largely to help you avoid having to do any of that, and let you focus on content and structure instead. Something similar is true of HTML.

    All of that gibberish tech talk, plus the fact that semantic HTML is typically easier to style up with CSS anyway :-P

    EDIT: I am, admittedly, focusing on `structural' rather than `semantic' for my argument.

  9. #8
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    It is up to the user-agent to apply presentation to the semantic elements, including the tags you listed, Transio.

    • Header: defines a header, allowing an outline of the document to be formed (something the W3C validator does as well as Google)
    • Paragraph: denotes a grammatical paragraph.
    • Strong: indicates that the specified text in a paragraph has more significance than its surroundings
    • Table: defines tabular data (not layout)
    • Horizontal rule: debatable, hence the thread.

    XSLT would be the best and most semantic solution, but it isn't widely enough supported yet.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  10. #9
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Meh. I've always preferred CSS. XSLT, while being more powerful, is also far too complicated for most situations.

  11. #10
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Quote Originally Posted by filburt1
    • Header: defines a header, allowing an outline of the document to be formed (something the W3C validator does as well as Google)[/
    • Paragraph: denotes a grammatical paragraph.
    • Strong: indicates that the specified text in a paragraph has more significance than its surroundings
    • Table: defines tabular data (not layout)
    • Horizontal rule: debatable, hence the thread.
    You're missing the point. Headings, paragraphs, tables, and rules are all presentation elements. While they may correspond to actual data elements (e.g. title, description, and price list for a product you're selling), they should only be addressed as what they are - definition of presentation.

    Let's do this by example. Let's say you have a data structure:
    Code:
    <?xml version="1.0" ?>
    <category id="1" title="Tools" description="Look at our amazing products below!">
        <product id="1" title="Big Hammer" description="This is a really biiiiiig hammer">
            <pricing>
                <price currency="USD">400.00</price>
                <price currency="GBP">200.00</price>
            </pricing>
        </product>
    </products>
    Now, I want to parse that data and present it to the user, so I use HTML:
    Code:
    <h1>Tools</h1>
    <p>Look at our amazing products below!</p>
    <hr />
    <h2>Hammer</h2>
    <p>This is a really biiiig hammer</p>
    <table>
        <thead>
            <tr>
                <th>Currency</th>
                <th>Price</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>USD</td>
                <td>$400.00</td>
            </tr>
            <tr>
                <td>GBP</td>
                <td>200.00</td>
            </tr>
        </tbody>
    </table>
    The HTML structure is relatively semantic, i.e. it translates back to the actual data pretty well, if you know what you're looking for.

    However, let's say I want to add another sibling data element to "products"... who knows... say, Services - and present them on the same page (I know no one would, but just for argument's sake, because there are cases where this will happen).

    Now, on the same page, we have two H2 elements, and all logic has gone down the drain, because we have 2 disparate entities with the same presentation.

    This is the inate problem with "semantic" HTML - it tries to turn HTML into a data definition language. If I want to transform the way my data looks relative to other data, I should do that at the Data->Presentation transformation (i.e. where I define Services and Products both with the H2 element), not at the Presentation->Styling transformation (i.e. where I define how the H2 element looks).

    Beyond that, everything is nit-picky and redundant. For that reason, I feel "semantic" HTML is pedantic.

    Ok, this explanation didn't turn out as well as I had hoped.... I hope you get my point anyway.


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:59 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com