SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Jul 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Validation I don't understand!

    Hi,

    I have the following error message in validation process:

    (The tag: "img" has an XML style closing syntax for an empty element even though version: "HTML4" is not an XML tag language.[HTML 4.0])

    The HTML coding Line is: <p><img src="../Photos/…curie te chevaux face est.jpg" width="260" height="175" /></p>

    I don't get it!

    Help please

    Jean-Pierre

  2. #2
    SitePoint Wizard bronze trophy Tailslide's Avatar
    Join Date
    Feb 2006
    Location
    Bedford, UK
    Posts
    1,687
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's because in HTML 4.0 you don't want image tags to be self-closing so you should remove the "/" at the end of the image tag.
    Little Blue Plane Web Design
    Blood, Sweat & Rust - A Land Rover restoration project

  3. #3
    SitePoint Member
    Join Date
    Jul 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot! I'll go on with that!

    JP

  4. #4
    SitePoint Zealot infinique's Avatar
    Join Date
    May 2009
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by JP Maher View Post
    Hi,

    I have the following error message in validation process:

    (The tag: "img" has an XML style closing syntax for an empty element even though version: "HTML4" is not an XML tag language.[HTML 4.0])

    The HTML coding Line is: <p><img src="../Photos/…curie te chevaux face est.jpg" width="260" height="175" /></p>

    I don't get it!

    Help please

    Jean-Pierre
    When you have an image try not to have spaces in between as they will create some code like 20%. Try to name it with dashes or underscore.

    E,g, ecurie-te-chevaux-facest.jpg

    It's better to use dash - as underscore _ is more related to database programming.

  5. #5
    SitePoint Member koolkat2009's Avatar
    Join Date
    Jun 2009
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    E,g, ecurie-te-chevaux-facest.jpg
    It's better to use dash - as underscore _ is more related to database programming.[/QUOTE]

    I don't understand! why can't just name the image: ecurietechevauxfacest.jpg
    KoolKat

  6. #6
    Resident curmudgeon bronze trophy gary.turner's Avatar
    Join Date
    Jan 2009
    Location
    Dallas
    Posts
    990
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can. Using hyphens is an effort toward keeping the space's readability.

    Ack! infinique, why respond to a dead thread?

    cheers,

    gary
    Anyone can build a usable website. It takes a graphic
    designer to make it slow, confusing, and painful to use.

    Simple minded html & css demos and tutorials


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
  •