Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

CSS and XHTML Validation

2»

Comments

  • dan39dan39 New
    edited January 2007
    "A little off topic: How does one do the cool quote thingy?"
    Well, you need to know XHTML to do that ;)
  • dan39 said: If you just try to write well-formed HTML, you don't exactly have a validator that's going to tell you when you left quotes off of an attribute.

    Yes there is. I validate HTML 4.0 strict all the time. And it complains about errors in my markup just as much as when I use XHTML. Well perhaps a bit less because HTML validators don't expect the CDATA stuff around CSS and Javascript. Try it out: http://validator.w3.org/
  • edited January 2007
    I know XHTML, I just don't know that attribute. I'm not opposed to XHTML, I just think all the fuss about it is unwarranted. I've seen the fieldset code, but I thought there would be some sort of forum feature. By the way, I don't think your quote thingy is cool. I'm talking about something I've seen elsewhere in the forum. Yours is just a dumb blockquote, which I believe originated in HTML...
  • dan39dan39 New
    edited January 2007
    Jeremy2 said, politely..."Yours is just a dumb blockquote "
    Calm down. I was joking.


    BTW, you're wrong about HTML Strict validating for well-formedness. It definitely doesn't.

    The following is not well-formed but still validates in HTML 4.01 Strict:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>Untitled</TITLE> </head> <body> <div CLASS=run> <P CLASS="stop">I didn't use quotes on my first class attribute, and I didn't use lowercase on this opening paragraph tag but HTML strict doesn't care. So much for well-formedness. </div> <p>Hey look! I forgot to close my body tag. No problem, it's HTML. Anything goes! </html>
  • edited January 2007
    Holy crap, you are right. I thought for sure that I had all sorts of errors pop up when I had forgotten quotes or what not. Perhaps it was XHTML I was validating before. Btw, I was mostly joking myself as well, though I was annoyed a bit. I grew up with a family that likes to heckle. The rounded corner stuff is rather nice. I got sick of trying to find a rounded corners solution that was not a pain in the butt, and this one does not seem to take up globs of code. I bet it doesn't validate, though :).
  • Meh. You want to see proper minimal HTML? (Yes, the markup below is valid HTML 4.01 Strict)
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <title>I heart HTML</title> <p>Hooray for HTML!
    But you're right. If you want to embed SVG images, or microformats in your website, you're probably better off using XHTML.
  • I warned this will turn out to be endless, fruitless discussion…
    XHTML is HTML made valid XML. Period. XML compatibility is a key factor, in many aspects.
  • dan39dan39 New
    edited June 2007
    BTW, the round corners are done with vendor specific CSS extensions. When the border-module spec is finalized and supported by future releases of the browsers, you'll just be able to use valid "border-radius" without the vendor specific CSS extensions. The vendor-specific CSS extensions are used to experiment in each browsing environment. It's an easy solution, but keep in mind that IE probably won't be recognizing border-radius for a few years.
  • "Perhaps it <span style="font-style: italic;">was</span> XHTML I was validating before." Of course, if you're talking semantic markup you should have used <em></em> ;) /me steps away from the fire...
  • You better not bash my CSS.... :)
  • dan39 said: It's an easy solution, but keep in mind that IE probably won't be recognizing border-radius for a few years.
    Ah, you mean it does not work in IE? Dang... I guess I am still stuck using images as an easy solution. IE sucks.
  • IE does indeed suck :( Anyone have any experience with http://dean.edwards.name/IE7/ ?
  • Well thanks everyone for answering me. It's a pity there wasn't a clear consensus, but I can just look positively and conclude that either option is OK, provided I do it "right". Just for the record, I took a typical page I had written and made up three pages with the same code but three different DTDs, all strict (HTML 4, XHTML 1.0 & XHTML 1.1), and submitted them for validation. (Remember I'm a total mug, someone who gets by using a very little knowledge and a lot of trial and error, and I had not really understood previously the importance of DTDs. Nvu, which I use, says it produces XHTML 1.0, so I wanted to see what it actually produced, though the "problems" were more likely to be me than it.) Anyway, both versions of XHTML produced 60+ validation errors, mainly the following four types - invalid meta tags, wrong use of <id> definitions, and no end tags for <img> and <br>, whereas the HTML had only 26 errors, and all relating to wrong use of <id> definitions - which I have yet to understand. My conclusion? Most of the things that were invalid XHTML I understand (I think), so it looks like it will be as easy for me to use XHTML as HTML, provided I am willing to go through all my pages and make all those changes - otherwise, HTML will simply be easier for now. But I think I will go to the trouble. Thanks again.
  • Wise choice. XHTML 1.0 is really all about getting people to write stricter HTML anyway I reckon. So it's good to get into the habit while you don't *need* to. I've been using XHTML 1.0 for several years now and had no more problems with it than HTML4, in fact, probably less, simply because I pay more attention to closing things and putting them in the right order in the first place.

    Good luck and have fun :)
  • dan39dan39 New
    edited February 2007
    @ercatli: I would recommend that you read the following document to get a broader understanding of the different "flavors" of HTML, XHTML and CSS. The document talks about the reasons why XHTML 1.1 isn't fully supported yet. http://www.456bereastreet.com/lab/developing_with_web_standards/full/ Once you've finished reading that document, you might be interested to read this post by Tim Berners-Lee about his thoughts on the future of HTML: http://dig.csail.mit.edu/breadcrumbs/node/166 and one counter-argument to his post can be found here: http://cafe.elharo.com/xml/why-tim-berners-lee-is-wrong/ This is a debate that won't be resolved anytime soon. But, you can kind of get a sense as to why there isn't a "right" DOCTYPE for your pages. It just depends on what you are trying to achieve.
This discussion has been closed.