SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Evangelist winterheat's Avatar
    Join Date
    Aug 2007
    Posts
    508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    why are we using XHTML DOCTYPE and <img /> tags when XHTML not supported by IE 6 & 7

    So i think the consensus is that IE 6 and 7 (and 8?) do not support XHTML rendering. Only Firefox, maybe Chrome, and other browsers support it.

    So the question is, why are we using XHTML DOCTYPE and those self-closing tags like <img /> when XHTML is not supported by IE 6 & 7 ? are we making a "hopeful" attempt? trying to make something that is a standard, but when 60&#37; or 2/3 of the browsers in use are not supporting it?

    For example, Facebook is using it. Even SitePoint's Forum pages are using it. Usually I just use HTML 4.01... but when writing Facebook pages, I sometimes will use XHTML format... as least if Facebook gets the content and parses it, it can understand XHTML and that's understandable... but Facebook is serving the content to general users again with a DOCTYPE of XHTML too... and even SitePoint or W3C.org is serving its pages to IE 7 with a DOCTYPE of XHTML. that's kind of weird, isn't it? thanks.
    Last edited by winterheat; Apr 18, 2009 at 06:11.

  2. #2
    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 winterheat View Post
    So the question is, why are we using XHTML DOCTYPE and those self-closing tags like <img /> when XHTML is not supported by IE 6 & 7 ?
    Because most people don't really know what they are doing. They listen to advice (at least the one that sounds good) and do not have sufficient knowledge to separate the wheat from the chaff.

    XHTML advocates hyped and praised XHTML at the beginning of this decade, and a lot of people (myself included) fell for it. I, and some others, eventually found out that most of it were lies, but many people still believe that 'XHTML' markup served as text/html is somehow technically superior – faster, more semantic(!), etc. – than the corresponding HTML markup.

    Even some clearly intelligent and knowledgeable people, like some of the SitePoint HQ staff, simply refuse to believe that XHTML isn't all that it's said to be.

    And here's the real clincher: even if Internet Explorer were to support XHTML, there still wouldn't be any good reasons for using real XHTML to mark up web pages! XML is not intended for this, and is poorly suited for the task. At least as long as we handcode or use contemporary WYSIWYG software to generate it.
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Evangelist winterheat's Avatar
    Join Date
    Aug 2007
    Posts
    508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    And here's the real clincher: even if Internet Explorer were to support XHTML, there still wouldn't be any good reasons for using real XHTML to mark up web pages! XML is not intended for this, and is poorly suited for the task. At least as long as we handcode or use contemporary WYSIWYG software to generate it.
    ah, i see... glad to know that... coz i usually like to use HTML 4.01... i don't understand though, why if IE supports XHTML, it is still not suited for authoring? isn't it just more strict? and always closing, and have a definite tree structure, etc?

    By the way AutisticCuckoo... do you live in Australia or Sweden? By the way I saw your blog and wonder why you use serif font for the main text? coz some time ago i read that serif font is good for printing but not so good for on screen display yet. Maybe the mac or Safari on PC is a little better. But i think Lucida Grande / Lucida Sans Unicode are quite easy on the eyes. thanks.

  4. #4
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I use XHTML strict markup.

    Not because I think it's superior, but because I like all my tags to be closed. Whilst XHTML doesn't follow the same principles as XML, I like XML syntax. For example, I much prefer <br /> to <br>. Why? I don't know - I just like to close any tag I open.

    Why strict? Because I like my code minimal and I somewhat prefer to work with a more restricted set of elements and attributes.

    I serve my pages as XHTML, but that doesn't effect me. It's just a markup I prefer.

    Currently, XHTML and HTML are pretty much the same apart from syntax. However, looking at the differences between XHTML 2 and HTML 5, XHTML 2 is certainly more popular and superior to HTML 5. It's also closer to implementation, whereas I believe HTML 5 is still under discussion.

    Off Topic:

    some time ago i read that serif font is good for printing but not so good for on screen display yet.
    That's a general guideline, and doesn't always hold truth. Sometimes it works, and on AutisticCuckoo's blog it does.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  5. #5
    SitePoint Evangelist winterheat's Avatar
    Join Date
    Aug 2007
    Posts
    508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by arkinstall View Post
    I use XHTML strict markup.

    Not because I think it's superior, but because I like all my tags to be closed. Whilst XHTML doesn't follow the same principles as XML, I like XML syntax. For example, I much prefer <br /> to <br>. Why? I don't know - I just like to close any tag I open.


    Off Topic:



    That's a general guideline, and doesn't always hold truth. Sometimes it works, and on AutisticCuckoo's blog it does.
    ha, ... like i like to open my cabinet doors in the kitchen and not close them... it must be personal preference... i am a scorpio and i suspect that virgo are more organized and tidy.

    i think on AutisticCuckoo website, the serif font still makes the reading not as smooth as sans-serif fonts like Lucida Grande / Lucida Sans Unicode... maybe just a personal preference. (by the way, i like AutisticCuckoo and think he is cool).

  6. #6
    Mazel tov! bronze trophy kohoutek's Avatar
    Join Date
    Aug 2004
    Location
    Hamburg, Germany
    Posts
    4,248
    Mentioned
    30 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by winterheat View Post
    ha, ... like i like to open my cabinet doors in the kitchen and not close them... it must be personal preference... i am a scorpio and i suspect that virgo are more organized and tidy.

    i think on AutisticCuckoo website, the serif font still makes the reading not as smooth as sans-serif fonts like Lucida Grande / Lucida Sans Unicode... maybe just a personal preference. (by the way, i like AutisticCuckoo and think he is cool).

    For long articles, I find Serif fonts much easier on the eyes. Tommy's articles are pretty long, so it's convenient for me. But, I'm a book nerd, so I'm used to reading long Serif text.

    As for XHTML, some CMS vendors (just as an example) make it a nightmare to change the outpout from XHTML to HTML 4.01. When a certain tool is required and you're not left with a choice, then there's no way of avoiding it, unless one hacks the system's core. I've had many debates on this with one of the developers for a popular and good CMS, but it didn't amount to anything.

    When I do have control over every aspect of my markup, then I do use HTML 4.01. And I do keep my cabinet doors closed.
    Maleika E. A. | Rockatee | Twitter | Dribbble



  7. #7
    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 winterheat View Post
    i don't understand though, why if IE supports XHTML, it is still not suited for authoring?
    Because it doesn't allow mistakes, and people make mistakes. If you are a techie geek running your own blog or site, perhaps you can deal with it. But a site where you have multiple authors/publishers, and perhaps even user-submitted content, you're going to need some elaborate validation/clean-up script. Presenting a well-formedness error message instead of the actual content is not appreciated by most users.

    As I said, if you have an authoring tool – preferably DOM based rather than text based – that guarantees well-formed output, then it might be a different matter. But as long as you don't need to mix in content from other XML namespaces, you gain absolutely nothing.

    Quote Originally Posted by winterheat View Post
    isn't it just more strict?
    No. It's neither more nor less strict than HTML. It's just more consistent. Both can be parsed unambiguously as long as the markup is valid.

    Pretend-XHTML (served as text/html) is just as inconsistent as HTML, since you must use NET syntax for some empty elements (where the end tag is forbidden in HTML) while you must not use NET syntax for some other empty elements (where the end tag is required in HTML).

    Quote Originally Posted by winterheat View Post
    By the way AutisticCuckoo... do you live in Australia or Sweden?
    I live in Sweden.

    Quote Originally Posted by winterheat View Post
    By the way I saw your blog and wonder why you use serif font for the main text?
    At the time virtually all blogs used sanserif text (mainly Verdana) and I wanted something slightly different. I happen to like Georgia a lot, so I went with that. I also think Kohoutek's comment is relevant: I also like reading books and I'm very much used to reading serif fonts (very few books use sanserif).

    Quote Originally Posted by winterheat View Post
    coz some time ago i read that serif font is good for printing but not so good for on screen display yet.
    This is an urban myth that has been debunked many times. Usability studies show that there is no measurable difference in readability between serif and sanserif fonts on-screen. Many users claim that they find sanserif fonts easier to read, but when actually tested they read serif fonts just as well.

    Quote Originally Posted by arkinstall View Post
    For example, I much prefer <br /> to <br>. Why? I don't know - I just like to close any tag I open.
    Then go ahead and use XHTML syntax. There's nothing wrong with that, since you're aware of what you're doing and that there are no technical benefits at all.

    It's when people who don't understand the differences between HTML and XHTML use the latter syntax (while serving it as HTML) that I often feel the need to try to educate them. Not necessarily to stop them from writing XHTML syntax, but to make them understand what they are doing and why.
    Birnam wood is come to Dunsinane

  8. #8
    SitePoint Evangelist winterheat's Avatar
    Join Date
    Aug 2007
    Posts
    508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ah, that might be true, that serif font at 16px is actually quite readable.

    maybe the less readable one is the one at 11px, 12px, etc

    i used PHP to print some samples:

    http://www.0011.com/css/test/font

    sans-serif looks like already quite readable at 11px. sans-serif takes a little larger to be more readable.

    for coding, i like to use Lucida Console or Monaco. Somehow, on screen, the serif does give me a feel of hindrance of text flow. but for text heading or title, i was thinking of using serif fonts.

    From that page, i like Georgia at 18px, Lucida Sans Unicode at 15px. Courier New at 15px, Lucida Console at 14px. It was viewing on a PC using Vista. thanks.

  9. #9
    SitePoint Evangelist winterheat's Avatar
    Join Date
    Aug 2007
    Posts
    508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    by the way, i put in some test for testing mac fonts...

    http://www.0011.com/css/test/font/mac

    looks like on Safari on PC, it will emulate Lucida Grande using Lucida Sans Unicode... or maybe it is actually using Lucida Grande... i wonder if it is the later case, can we actually extract Lucida Grande to use on our PC?

    It didn't emulate Monaco using Lucida Console, but rather, is just showing it using Courier.


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
  •