Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I generate my meta tags dynamically, they render like this:

<meta id="HeadContent_MetaDescription" name="description" content="Is Adobe Flash going out?  And is HTML5 taking over the world?"></meta>

The ID isn't needed, and it doesn't close with />. Is this OK? Or going to cause problems?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

That's not valid HTML as the <meta> tag has no closing element. So remove the </meta> tag and use the trailing /. Also, the ID attribute is not valid for meta tags. So you would need to change your meta tag to look like this to be valid xHTML:

<meta name="description" content="Is Adobe Flash going out?  And is HTML5 taking over the world?" />

If you aren't use xHTML then you can omit the trailing slash:

<meta name="description" content="Is Adobe Flash going out?  And is HTML5 taking over the world?">
share|improve this answer
    
Ah ok guess this is a SO question then. Thanks for your help. –  Tom Gullen Mar 7 '11 at 20:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.