0

I would like to know if this code is allowed?

<article intro> .... </article> 

I would like to use this if this is valid as attribute/elements of HTML5. If possible, i wanted to use this to simplify my HTML / CSS connection. Instead of using class="intro" will use [intro].

7
  • 1
    We have validator.w3.org/ Commented Aug 24, 2013 at 7:52
  • Yes sir, however i saw one time a site that uses this kind of element. But after i check it to validator. "Attribute intro not allowed on element article at this point". Commented Aug 24, 2013 at 7:57
  • Ok thank you Mr. Alien got your point. Btw, this custom attributes makes me confused. Let say, instead of using class="intro" for my CSS, I'll use intro to make it look like [intro] than to this .intro. But referring to my comment, it is not valid as it is for HTML5. As @nisarg statement link "Custom tags are not valid in HTML5. But currently browsers are supporting to parse them and also you can use them using css." Thank You for your time. Commented Aug 24, 2013 at 8:23
  • Wait wait, what you are trying here, where did class came here? Commented Aug 24, 2013 at 8:25
  • 1
    Nah, don't do that, instead follow the default approach, the way you are doing is wrong Commented Aug 24, 2013 at 8:33

1 Answer 1

1

Use following validating tool for HTML 5 :

http://html5.validator.nu/

http://validator.w3.org/

Use this code :

<article data-intro> .... </article> 
Sign up to request clarification or add additional context in comments.

5 Comments

This doesn't answer the question.
Then what is the answer for checking the validate HTML?
Here he can check "HTML is valid or not".
Here he can get answer with suggestion and even also with solution. I think its better way to check validate HTML.
See the above comment i.e :" Yes sir, however i saw one time a site that uses this kind of element. But after i check it to validator. "Attribute intro not allowed on element article at this point". – user852916"

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.