Forum Moderators: open

Message Too Old, No Replies

<link rel .> NOT closed?!

         

Makaveli2007

2:21 am on Dec 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If I want to reference a stylesheet I use the <link rel...>-element.

Wouldn't the tag surrounding it not have to be closed (<link rel.../ >) to be HTML 4.01 strict?

Or is this one element/tag an exception to this rule?

encyclo

2:29 am on Dec 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Trailing slashes are for XHTML only. The
link
element does not take a closing tag in HTML:

<link rel="stylesheet" type="text/css" href="/path/to/stylesheet.css">

Dabrowski

7:42 pm on Dec 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Also, don't use XHTML as whie HTML4.01/STRICT is still recognised as standard, HTML5 is set to replace it. There are issues with server mime types and browser interpretation for XHTML.