0

How to check in javascript, if the elements support the HTML5 lang attribute?

2
  • use this framworks that check html5 : modernizr.com Commented Mar 20, 2012 at 15:18
  • 1
    lang attribute is part of generic attributes even on html4: w3.org/TR/html4/sgml/dtd.html#coreattrs - why do you need to check its support via js? Commented Mar 20, 2012 at 15:19

1 Answer 1

1

You cannot. HTML(5) does not have any built-in validation capabilities. If HTML were an instance of a schema language then you could easily validate against the schema.

Sign up to request clarification or add additional context in comments.

1 Comment

then I make it with try catch

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.