View Full Version : dispute with properly ending a meta tag

04-03-2011, 10:39 PM
This is a simple question. I have seen websites use these tags both way. Which one is right?

<meta name="robots" content="index,follow">

<meta name="keywords" content="-">

<meta name="description" content="-">


<meta name="robots" content="index,follow"/>

<meta name="keywords" content="-"/>

<meta name="description" content="-"/>

You would be surprised how many high end websites for big companies do it both ways.

Which is correct or, does it not make a difference?

Even The W3 html tidy function , when cleaning code, removes the / yet I though that is required to end the tag

04-03-2011, 10:46 PM
Depends whether you're using html or xhtml - as defined by the doctype. If the former, no closing slash is required, if the latter, it is.

Have a look here (http://www.w3schools.com/xhtml/xhtml_html.asp) for a simple explanation.