SitePoint Sponsor

User Tag List

Page 2 of 11 FirstFirst 123456 ... LastLast
Results 26 to 50 of 265
  1. #26
    SitePoint Evangelist ikeo's Avatar
    Join Date
    Oct 2004
    Location
    Austin Texas
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here I was thinking I knew a little something about xhtml/html/css and I read this. I'm completely blown away ... I had no idea that xhtml's present benefits were few and far between.
    To top that IE6 and EVEN IE7 will not support xhtml!!!
    ... i know nothing ....

    Thanks for the great post!

  2. #27
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mazr
    The FAQ should mention that XHTML does not support the target attribute. From what I understand you have to resort to some kludgy JavaScript similar to the following:
    Code:
    <a onclick="window.open(this.href); return false;" onkeypress="window.open(this.href); return false;" href="abc">text</a>
    Of course, JavaScript may be turned off.
    XHTML "supports" the target attribute equally much as HTML4. It is included in Transitional, but not in Strict. Oh, and using onkeypress here does nothing but hurting keyboard navigation.
    Simon Pieters

  3. #28
    SitePoint Zealot
    Join Date
    Dec 2005
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by zcorpan
    XHTML "supports" the target attribute equally much as HTML4. It is included in Transitional, but not in Strict. Oh, and using onkeypress here does nothing but hurting keyboard navigation.
    If it's in transitional but not strict and JS is the only alternative, my view is that the capability is deprecated with no alternative good alternative. Of course we may be in transitional (or even quirks mode) for a very long time so perhaps doing transitional is okay.

  4. #29
    SitePoint Addict gl3nnx's Avatar
    Join Date
    May 2005
    Location
    at http://www.gl3nnx.net
    Posts
    343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i love XHTML websites! im planning to study XHTML 2.0 but how can i start? i dunno if my current browser will support that technology!

  5. #30
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mazr
    If it's in transitional but not strict and JS is the only alternative, my view is that the capability is deprecated with no alternative good alternative.
    • HTML (or XHTML) is for structure and semantics.
    • CSS is for presentation.
    • JavaScript is for interactive behaviour.

    Opening a new window is behaviour.

    Quote Originally Posted by Mazr
    Of course we may be in transitional (or even quirks mode) for a very long time so perhaps doing transitional is okay.
    You should only use a Transitional doctype during the transitional (gasp!) period when you're converting an old tag-soup document into semantic markup. It's not meant to be used when creating new documents.

    It's <pre-html4-doctype> → Transitional → Strict
    or <nothing> → Strict
    (At least that's how it's meant to be.)
    Birnam wood is come to Dunsinane

  6. #31
    The Mind's I ® silver trophy Dark Tranquility's Avatar
    Join Date
    Sep 2003
    Location
    KSA - UAE
    Posts
    9,457
    Mentioned
    8 Post(s)
    Tagged
    1 Thread(s)
    Awesome Tommy! Thanks for it

  7. #32
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you very much for such a useful and concise article!

    We shouldn't forget also that XHTML provides a means of better standardising the way we code and therefore work, especially when working within a team of developers who might have gained a broad spectrum of HTML-based habits.

    Since we as a team adopted XHTML, it has helped us communicate about coding techniques, QA code and look to develop useful templates for future use. little of this would have been possible if we had stuck with the almost formless HTML.
    Kieron McIntyre
    www.digbyswift.com

  8. #33
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by digbyswift
    We shouldn't forget also that XHTML provides a means of better standardising the way we code and therefore work, especially when working within a team of developers who might have gained a broad spectrum of HTML-based habits.
    And how, exactly, is that? XHTML is not the same thing as web standards. You can – and should – be consistent when writing your markup, and separate structure from presentation and behaviour, regardless of whether you use HTML or XHTML. Especially since 99.99% of 'XHTML' sites don't really use XHTML at all.

    I'm honestly curious. How does XHTML provide 'a means of better standardising the way we code', compared to HTML? I've looked deeply into the topic of XHTML vs HTML, and I have found no evidence of what you're claiming, so I'd appreciate very much if you could substantiate that claim and back it up with tangible evidence.
    Birnam wood is come to Dunsinane

  9. #34
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    I must assume he was referring to well-formedness being easier to write.

    I was under the assumition XHTML has five predefined entities: (&lt;, &gt;, &amp;, &quot;, and & apos; or did I misread the post.

  10. #35
    SitePoint Zealot
    Join Date
    Dec 2005
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo
    • HTML (or XHTML) is for structure and semantics.
    • CSS is for presentation.
    • JavaScript is for interactive behaviour.

    Opening a new window is behaviour.
    Thanks for the explaination. I just migrated a mini-app to use window.open instead of target so it's XHTML 1.0 Strict now. I'm still not used to using JavaScript when it's not technically required but the separation makes sense.

  11. #36
    SitePoint Enthusiast Noosa Life's Avatar
    Join Date
    Aug 2003
    Location
    Sunshine Coast, Queensland, Australia
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I have read and re-read these comments and posts, and can be considered a user of XHTML for no apparent reason other than lots of other people were. (and I like the green tick on FF that says I did at least something right today)

    In my efforts to understand this better could we take the simplistic view that as long as validation is based on STRICT (HTML or XHTML) and that the choice of using HTML or XHTML is chosen based on your need (or lack) for say Javascript that you will be fine.

    Especially as the apparent benefits of true XHTML documents for use on the WEB (I am ignoring extranet or intranet usage) appear to not exist as yet ?

    Cheers

  12. #37
    SitePoint Guru Skyblaze's Avatar
    Join Date
    Jul 2005
    Location
    Italy
    Posts
    734
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by xhtmlcoder
    I must assume he was referring to well-formedness being easier to write.

    I was under the assumition XHTML has five predefined entities: (&lt;, &gt;, &amp;, &quot;, and & apos; or did I misread the post.
    me, i believed that i could use any character entities

  13. #38
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So xhtml is the new level of writing?

  14. #39
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo
    How does XHTML provide 'a means of better standardising the way we code', compared to HTML?
    This was the point I was making in another thread: XHTML on a functional level may not provide a means of better standardising code, but I think it does on a conceptual level. XHTML has become the standard-bearer of web ...um... standards. The emergence of XHTML, being a new variant of HTML, has forced people to look again at the way they've been doing things and realising that there's a rising movement of people doing things in a way they hadn't considered before.

  15. #40
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by xhtmlcoder
    I was under the assumition XHTML has five predefined entities: (&lt;, &gt;, &amp;, &quot;, and & apos; or did I misread the post.
    Well, it's not very clear, so it's my fault if you misread it.

    &#38;lt;, &#38;gt;, &#38;amp; and &#38;quot; are defined in both HTML and X(HT)ML. In addition, X(HT)ML defines &#38;apos;. What I was saying was that in HTML you can only use the first four, in XHTML you can use all five.

    Quote Originally Posted by Skyblaze
    me, i believed that i could use any character entities
    You can't rely on that in XHTML (served as XML). The character entities are defined in the DTD, but browsers use non-validating XML parsers that don't read the DTD. Gecko browsers have the list of entities hard-coded into the parser (IIRC), so it will work there. Others do not, and will only understand the five predefined entities.

    When a document is served as text/html, it is HTML, and HTML parsers have the list of entities hard-coded. Really old browsers don't support all entities, but the more common ones are widely supported.

    Quote Originally Posted by jstep289
    So xhtml is the new level of writing?
    I don't know what gave you that idea.
    XHTML is not exactly 'new' (the first specification came out in 2000). It's not on a different 'level' from HTML either. It's XML, which is different from HTML, but not necessarily better or worse except in certain details which I've tried to highlight in the first post.

    Quote Originally Posted by Tyssen
    XHTML has become the standard-bearer of web ...um... standards.
    So what you're saying is that XHTML is better because lots of people say it's better? There is lots of misinformation being used to promote XHTML: that it's more strict and more semantic than HTML; that you cannot use CSS with HTML; that mobile phones require XHTML; that it's more future-proof; that it renders faster, etc.

    Quote Originally Posted by Tyssen
    The emergence of XHTML, being a new variant of HTML ...
    No! Please re-read the first post in this thread. XHTML is not a 'new variant of HTML'. It is an application of XML, which happens to have the same element semantics as HTML. This may seem to be hair-splitting, but the difference is fundamental and anyone who ventures into using XHTML should understand it.
    Birnam wood is come to Dunsinane

  16. #41
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo
    So what you're saying is that XHTML is better because lots of people say it's better? There is lots of misinformation being used to promote XHTML
    I'm not saying it is better and I'm not commenting on the rightness or wrongness of some of the messages being associated with XHTML, I'm just pointing out that a lot of people have come to learn about web standards and CSS and tableless coding and doctypes because they first heard about XHTML. It was the catalyst for a lot of people to change their way of thinking about coding their pages.

  17. #42
    SitePoint Member
    Join Date
    Jun 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Apologies if there was some misinterpretation of what i wrote. I meant that XHTML allows us to be more uniform in the WAY we code. For example, if i ask 5 developers to code up a 2x2 table in HTML there would be significant differences in each developer's table code, e.g. use of quotes, height. In XHTML, the code should be almost identical (ordering of attributes allowing). Also, if i wanted to parse a page for P tags the same 5 developers may use non-well-formed tags making it impossible to distinguish separate paragraphs. In XHTML this would be simple.

    Apologies for such crude examples but my point was that XHTML does help. As a team we work to the same rules and although we could have done this with HTML, using XHTML helps eradicate inconsistencies.
    Kieron McIntyre
    www.digbyswift.com

  18. #43
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,213
    Mentioned
    236 Post(s)
    Tagged
    1 Thread(s)
    I think that the biggest advantage is that your document will be ready to become a full XML with just changing the way you serve it and then being able to take full advantage of what XML offers.

  19. #44
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by digbyswift
    For example, if i ask 5 developers to code up a 2x2 table in HTML there would be significant differences in each developer's table code, e.g. use of quotes, height. In XHTML, the code should be almost identical (ordering of attributes allowing).
    Nope. Some developers would include <tbody> and </tbody> tags, while others would omit them. Both are valid XHTML.

    Quote Originally Posted by digbyswift
    Also, if i wanted to parse a page for P tags the same 5 developers may use non-well-formed tags making it impossible to distinguish separate paragraphs.
    Really? And how do you think browsers manage? With HTML's rules, valid markup can be parsed unambiguously. In this case, the start tag of any block-level element will implicitly close the paragraph. The next <p>, for instance. XHTML's rules are simpler and more consistent, though. However, there is nothing that prevents you from closing paragraphs in HTML either! The fact that you may omit the end tag does in no way imply that you should.

    What your organisation needs is a Style Guide that everyone has to follow. Whether you use HTML or XHTML is not relevant in this respect. If the Style Guide mandates that explicit closing tags must be used for all element types that allow them, there you go.

    And here's the clincher: even if you use XHTML markup, none of these 'benefits' will appear unless you serve your documents as XML. Serve them as text/html and you'll be able to omit end tags, use unquoted attribute values, etc. Because you're not using XHTML at all; just HTML with syntax errors.
    Birnam wood is come to Dunsinane

  20. #45
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by molona
    I think that the biggest advantage is that your document will be ready to become a full XML with just changing the way you serve it and then being able to take full advantage of what XML offers.
    If you could serve the document as text/html there cannot be any XML features to take advantage of.

    If you have to add those features, it will be just as much work whether you used XHTML or HTML markup to begin with (assuming that you have an editor that supports search-and-replace).
    Birnam wood is come to Dunsinane

  21. #46
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TOOLman
    Well, it's not very clear, so it's my fault if you misread it.
    I misread it, but didn't misunderstand it and that's what I thought you meant in the first place; "Only &#38;quot;, &#38;amp;, &lt;, and &#38;gt; will work reliably in all processing situations" though others might not have understood.

  22. #47
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,213
    Mentioned
    236 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by AutisticCuckoo
    If you could serve the document as text/html there cannot be any XML features to take advantage of.

    If you have to add those features, it will be just as much work whether you used XHTML or HTML markup to begin with (assuming that you have an editor that supports search-and-replace).
    That's why I said "will be ready to take advantage" and not "will take advantage".

    You don't have to change the markup, just the way you serve it. Then, you could take advantage of namespaces, as an example. Am I wrong?

  23. #48
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, but making well-written HTML 4.01 Strict 'ready' in that way would be a matter of seconds, anyway.

    The point is that in order to actually do take advantage of the XML-ness, you'll have to change the markup anyway (by adding those elements from another namespace).
    Birnam wood is come to Dunsinane

  24. #49
    SitePoint Enthusiast Silverhawk's Avatar
    Join Date
    Sep 2003
    Location
    Malaysia
    Posts
    92
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use XHTML cause i like its well-formness. I like the rules like lowercase tagnames, quoted attributes, closing tags etc. Not that you can't do this in HTML4, but the fact that this is forced for it to validate does make it easier to work with others.

  25. #50
    SitePoint Guru
    Join Date
    Apr 2000
    Location
    Paris
    Posts
    617
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Xhtml is good for validation purposes and I am surprised that there are no references to HTML Tidy. And I accept that there are layout problems with html tidy.

    I like the distinction made between html and xhtml here and we should add that the browser amaya, available for download on the web site of w3c.org really belongs to this clarification between xhtml and html.
    fash


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
  •