The above example will work fine in most browsers, but don’t rely on this approach. Forgetting to use a closing tag can produce unpredictable results or errors.
Note
: Future versions of HTML will not allow the closing tag to be omitted.
Empty HTML element
An HTML element without content is called an empty element. Empty elements are closed in the opening tag.
is an empty element without a closing tag ( tag definition wraps).
In XHTML, XML, and future versions of HTML, all elements must be closed.
Adding a slash in the opening tag, such as , is the correct way to close an empty element, and is accepted by HTML, XHTML, and XML.
Even though is valid in all browsers, using is actually a longer-term guarantee.
The courseware is not available for download at the moment. The staff is currently organizing it. Please pay more attention to this course in the future~
Students who have watched this course are also learning