Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I enclose tags with /> or not in HTML5?

Tags:

html

First, I looked at html5rocks.com sources. Looks like trusted site. And they close tags there.

 <link rel="shortcut icon" href="/favicon.ico" />

Then I looked at HTML5demos, and they don't

 <link rel="stylesheet" href="css/html5demos.css">
like image 913
Dan Avatar asked Nov 16 '11 08:11

Dan


1 Answers

It's entirely optional. However, if you ever want to process a HTML5 file with an XML parser then i'd be inclined to include them.

like image 169
GordonM Avatar answered Sep 21 '22 12:09

GordonM