XHTML How To Write

Whenever you start to write a XHTML document, first step is to defines document type on the top of the document.

  • Use the transitional DOCTYPE when you want to write document in proper rules.

  • XHTML every tag attributes must be write inside double Quotation.

<!DOCTYPE html>

This declaration needs to be the first in your HTML document.

<!DOCTYPE html>

Every tag must be properly nested. Every tag must be closed. Few HTML tags such as <hr>, <img>, <br> elements is an empty tag or self closing elements.

The <link> tag is empty tag so its must be closed /> at the end of the tag.

<link rel="stylesheet" type="text/css" href="screen.css" />

HTML <hr>, <img>, <br> tag is empty tag than the tag must be closed /> at the end of the tag.

<img src="../images/html.jpg" width="128" height="128" />

<hr align="center" width="80%" />

<br />