does the link element have a closing back slash or not
i.e is it
(1) <link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
or
(2) <link href="css/style.css" rel="stylesheet" type="text/css" media="all" >
Stacy_2
0
Newbie Poster
Recommended Answers
Jump to PostIf you use a (X)HTML strict doctype then you will have to use a closing backslash, but with HTML5 doctype for example you can use the second as well.
Jump to PostHTML NEVER had a self closing elementXHTML required all elements to close, singleton elements were required to self close,
<img alt='' src='' />
or<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
or<a href=''>link text</a>
XHTML is happily dead in favour of HTML5 the elements now look like<link rel="stylesheet" href="theme.css">
type not required<script …
All 5 Replies
gentlemedia
803
Master Poster
Traevel
216
Light Poster
Stacy_2
0
Newbie Poster
gentlemedia
803
Master Poster
almostbob
866
Retired: passive income ROCKS
Troy III
commented:
exactly
+9
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.