+ 1

All HTML element can have attribute ???

I don't understand this, can the <!DOCTYPE html> element have attribute? If no, why is this assertion true?? https://www.sololearn.com/post/556914/?ref=app

10th Sep 2020, 9:40 AM
Nathan Sikati
Nathan Sikati - avatar
1 Answer
+ 10
Nathan Sikati Remember that all html "elements can have attributes" and doctype isn't an html element. So all html elements can have attributes is a right assertion. <!DOCTYPE HTML> is not a tag. It is a "header" to give information to the browser on what type of document type is using. this controversy has taken place before too. check this so your doubts can be cleared. https://www.sololearn.com/Discuss/2328167/?ref=app hope this helps✌
10th Sep 2020, 9:46 AM
Piyush
Piyush - avatar