SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    Bored One boredboi's Avatar
    Join Date
    Jul 2000
    Posts
    238
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What's the difference?
    Most sites simply say "Use this when you want really clean structural mark-up, free of any tags associated with layout".

    I get this error on the w3c validator:
    Error: document type does not allow element "img" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "address", "fieldset", "ins", "del" start-tag

    Must I put a <img> in a <p> to conform to strict standards?


  2. #2
    Irritability Defined
    Join Date
    Jul 2000
    Location
    80,000 feet below the surface
    Posts
    1,442
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Strictly speaking (pardon the stupid pun), yes.

    If you're using the strict DTD then you must use <p> </p> blocks (or one of the tags pointed out by the validator) for pretty much all of the code inside your <body> </body> (that is, you need to break everything down on your site into one of those tags as pointed out by the validator). If you use the transitional DTD however the validator is more relaxed about the placement of certain tags (as it accomodates errors more easily and is slightly more compatible with older browsers).

    Personally speaking I use the transitional DTD to avoid any trouble. After all I place design, usability and functional aspects above code cleanliness.
    My 2 Cents (or is that 2.2 Cents including GST?)

  3. #3
    Don't get too close, I bite! Nicky's Avatar
    Join Date
    Jul 1999
    Location
    Lancashire, UK
    Posts
    8,277
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I use the transistional DTD too and for the most part I ahve found that most speech browsers can cope with it. It is when you do really stupid things like leave out ALT tags that they get confused!


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
  •