SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    732
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    potentially stupid but most likely easy question.

    I am finding
    HTML Code:
    <img src="whatever/whatever.jpg" />
    and
    HTML Code:
    <img src="whatever/whatever.jpg">
    both works. but which one is the correct one w/the "/" or without it?
    thank you all.
    D

  2. #2
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,407
    Mentioned
    81 Post(s)
    Tagged
    3 Thread(s)
    It depends on your doctype, the first one is for a XHTML doctype and the second is for an HTML.

  3. #3
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    732
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thank you, I didn't know that.
    I am finding both on this html page, not sure if it would be best to leave them all alone, is there an opinion or bkm on this?
    Thx
    d

  4. #4
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,407
    Mentioned
    81 Post(s)
    Tagged
    3 Thread(s)
    You will get errors if you run your page through a validator but I do not think it will effect the page. Personally I would change them and it should not take long with a copy and paste.

  5. #5
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    732
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thank you Rubble.
    D


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
  •