+ 2
Attributes
Challenge question: āAll HTML elements can have attributes.ā Answer: True. My question: What attributes can a <br />, <pre>, <head>, <title> or <!Doctype html> element have?
10 Answers
+ 4
All HTML elements can have attributes due to global attributes.
Global attributes are attributes common to all HTML elements; they can be used on all elements, though they may have no effect on some elements.
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes
<!Doctype HTML> is not a HTML element, it is considered a preamble/ declaration.
https://code.sololearn.com/Wc6oYR3W6iy0
+ 5
TahitišCastillo
I have been caught by the wording of that question also.
There are quite a few with misleading statements, but don't allow it to upset you.
+ 4
Rik Wittkopp Thank you for your understanding and civility.
+ 3
ODLNT Thank you for this cogent explanation. Iām sure it will also be helpful to others. Itās the disclaimer, āthough they may have no effect on some elements,ā that clears everything up.
+ 2
AĶ¢J
I have noticed that we all use the English language in slightly different ways, with a simple sentence being interpreted differently by individuals.
English is my mother tongue, but quite often I note foreign speakers have a better understanding of the pure logic of the words.
+ 2
Actually they can, using <br/> as an example has global and event handler attributes.
+ 2
Samuel T.P I honestly had no idea that this was the case until today. Iāll need to brush up on event handler attributes. Thank you.
0
AĶ¢J So the <br /> element ācan haveā an attribute?
0
AĶ¢J Neither your question nor your answer above make any sense. Do I know the difference between ācan haveā and āhaveā? Thatās an asinine, unhelpful question that seems like nothing more than an attempt to offend.
There either is a possibility, or there is no possibility. āMight be possibilityā makes no sense. If an example canāt be cited as precedent for the possibility, then there must not be a possibility.
0
AĶ¢J Again, there is no sense in your question, because it was snarky and unwarranted. I obviously know the difference between ācan haveā and āhaveā. Your answer makes sense to you. It does not make sense to me.