Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: Empty tags

  1. #1
    Regular Coder oldcrazylegs's Avatar
    Join Date
    Feb 2004
    Location
    East Moline Illinois USA
    Posts
    414
    Thanks
    4
    Thanked 5 Times in 4 Posts

    Empty tags

    In HTML 5 do empty tags like <link> have to be terminated like <link /> in XHTML or as <link> in HTML 4?

  • #2
    New Coder
    Join Date
    Mar 2009
    Posts
    62
    Thanks
    19
    Thanked 1 Time in 1 Post
    Straight aswer to your example I belive: <link />
    http://www.w3schools.com/html5/tag_link.asp

    To any other tag related question:
    http://www.w3schools.com/html5/html5_reference.asp

  • #3
    Regular Coder
    Join Date
    Apr 2008
    Posts
    685
    Thanks
    15
    Thanked 105 Times in 104 Posts
    From what I remember they don't have to be, they just allow for it due to the widespread use of XHTML, and allow for the ease of migrating from this DOCTYPE.

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,724
    Thanks
    6
    Thanked 1,013 Times in 986 Posts
    HTML 5 can be written with classic HTML syntax or with XHTML syntax, depending on how you send it (as text/html or as application/xml+xhtml). Mind that if you send it as XML you also need to provide the proper namespace.

    http://www.w3.org/TR/2008/WD-html5-d...080122/#syntax

  • #5
    Regular Coder oldcrazylegs's Avatar
    Join Date
    Feb 2004
    Location
    East Moline Illinois USA
    Posts
    414
    Thanks
    4
    Thanked 5 Times in 4 Posts
    Straight aswer to your example I belive: <link />
    http://www.w3schools.com/html5/tag_link.asp

    I saw that but wasn't sure if it was the correct way. It seemed strange mixing HTML with XHTML. Thanks.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •