SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: < </ Difference

  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2011
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    < </ Difference

    For these opening and closing tages < /< is there any difference,
    have I missed something?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,117
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    It depends on what doctype you are using (the line at the top of your page). In other posts you've made, you've been using an xhtml doctype, so in that case your closing tags should be />

    E.g.

    Code:
    <img src="" alt="" />
    If you were using an html4 doctype, you'd use this:

    Code:
    <img src="" alt="">
    Even though that's what you are supposed to do, browsers will let you off the hook if you use the wrong one.


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
  •