+ 1
<hr width="10%" align="right" />
For the align attribute lesson, why is the horizontal line element not closed before defining its attributes? I mean its tag should be closed before defining attribute for it. <strong>#iamconfused</strong>
2 Respuestas
+ 2
In HTML, the <hr> tag has no end tag.
In XHTML, the <hr> tag must be properly closed, like this: <hr />.
https://www.w3schools.com/tags/tag_hr.asp
+ 1
A little bit on why, see "Empty HTML Elements":
https://www.w3schools.com/html/html_elements.asp
In the specifications:
https://dev.w3.org/html5/html-author/#void