• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

trailing slashes

mungo

New member
#1
i've just downloaded the code and am beginning to play with the admin panel...

just wondering why the html5 doctype is being used (cool, i like this) but lots of html elements in the default template have trailing slashes, such as:

<link rel="stylesheet" type="text/css" href="css.php?css=xenforo,form,public&amp;style=1&amp;d=1294069603" />

and

<meta name="description" content="yadda, yadda, here is my description" />

as this is invalid code, unless there is something i don't know!
 

Brogan

XenForo moderator
Staff member
#2
I've moved the thread from template modifications to general support.

As I understand it, using a trailing or closing slash in void or empty elements is perfectly acceptable in HTML5.
 

mungo

New member
#3
yes, i thought it was acceptable (for historic reasons, eg from xhtml use) but was ideally avoided

i'm happy with the forum, although it's taking a while to get to grips with it!
 

mungo

New member
#7
ah, ok Shadab, this forum is brand new to me, now i get the attribution link, thanks - i assumed the quoted [...] was a link!

anyway you learn something everyday, i had no idea there was an xhtml version of html 5 - now i do