7
When we insert attributes Boolean in the elements (tag) <html>
we do not need to inform the value true
, its mere presence already confirms, by default, that this attribute is active. Example:
<html lang="pt-BR" spellcheck>
<body>
<p contenteditable="true">Texto será verificado se conter erros!</p>
</body>
</html>
Note that the attribute spellcheck
in the element html
is without the value "true"
however, the grammar will be checked on any child element of the root html
.
Question: is it correct to use attributes Boolean without stating its value? What is the advantage or disadvantage? Any usage convention? Thank you!