+ 5
Can all html elements have attributes? What attribute <! DOCTYPE html> can have ?
Today I have played a challenge against Vikash Pal and there was a question that all elements can have attribute. It was true/false question and I choose false. It went wrong. Is that mean <!doctype html> element can hold any kind of attribute?
9 Réponses
+ 6
No. It can not have attributes.
<!DOCTYPE> is not a tag, it is a declaration that allows the browser to know what kind of document it will interpret.
Btw, all tags can have attributes. There are some that only allow global attributes or whose behavior will not be altered by them, but they are allowed.
https://www.w3schools.com/html/html_attributes.asp
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes
+ 4
Mickel Sánchez So the Question which asks which tag cannot have attribute was false. Because the answer was <!DOCTYPE html>.
+ 3
so what attribute is for <br> or <big> <b> ,<i>?
Before the ans was false now it changed to true. Not only that now mailto : needs a freaking space in between colon otherwise its a mistake? Same with a text area question. I got more.. just lost 4 in a row because of some of these retarded answers of new challenges.
+ 3
Report the question and indicate that it is not a tag, but a statement. There are wrong questions in several languages, but if you report it they are fixed in a few days (in my case it has been like this)
+ 3
Akib Reza i found that space before "mailto" weird too. reported it as wrong.
we shouldn't be too hard with sololearn. they can't catch everything :)
+ 2
Akib Reza They admit global attributes like style, id, class, data-*, etc.
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes
0
i cant suggest my own quiz in the quiz factory using HTML weapon... i dont know why!!!
0
It is the declaration of a html 5 page, not a tag.