Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which browsers don't support empty tags?

Tags:

The intellij linter throws an Empty Tag-warning:

Reports empty tags (like script ) that do not work in some browsers.The validation works in html or jsp file types.

Which browsers are affected by the problem? How important is it to clear that warning?

like image 436
Christian Avatar asked Feb 07 '19 08:02

Christian


People also ask

Which is not empty tag in HTML?

The <hr/> and <br/> tag which is used for a horizontal line and line break respectively, doen't contains any content in it and thus are called empty elements in HTML. <p> tag contains text/paragraph in it so it's not an empty element.

Can we have empty HTML tags?

An element that does not have an enclosing tag is called an empty element. Adding the closing tags to the empty elements will be invalid syntax. The empty elements don't have any child nodes. In short, Empty elements are self-closing or void and not container tags.

Does empty tag require a closing tag?

Empty HTML Elements HTML elements with no content are called empty elements. <br> is an empty element without a closing tag (the <br> tag defines a line break). Tip: In XHTML, all elements must be closed.


1 Answers

All browsers except Netscape 4 will allow empty tags.

refer: Is using empty tags valid in HTML5?

like image 112
Harshit Avatar answered Sep 28 '22 05:09

Harshit