+ 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 Respostas
+ 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.