Leakbali
w3 Tutorial, Web Tutorial
Register   Login
Share

Empty HTML Elements 


HTML elements with no content are called empty elements. Empty elements can be closed in the start tag.

<br> is an empty element without a closing tag (the <br> tag defines a line break).

In XHTML, XML, and future versions of HTML, all elements must be closed.

Adding a slash to the start tag, like <br />, is the proper way of closing empty elements, accepted by HTML, XHTML and XML.

Even if <br> works in all browsers, writing <br /> instead is more future proof.
More Tutorial
  1. HTML - HTML Elements
  2. HTML - HTML Element Syntax
  3. HTML - HTML Document Example
  4. HTML - HTML Example Explained
  5. HTML - Don't Forget the End Tag
  6. HTML - Empty HTML Elements
  7. HTML - Lowercase Tags

References

About Us

Home
About Us
Contact Us
Sitemap

Tools

Google PageRank
Alexa Rank
Keywords Density

Accounts

Register Account
Login
Valid XHTML 1.0 TransitionalValid CSS!
Web Directory


2006 - 2012 © Leakbali.com - Free Web Tutorial, Free Web Articles, Web Sharing, Source Codes, Web References