XHTML (Extensible Hypertext Markup Language) is similar to HTML. If anyone knows how to create Web Pages using HTML, then he already knows most of what he needs to know about creating Web pages using XHTML. Although HTML can define both the appearance and the structure of a Web page, XHTML defines the structure of a Web page while relying on other technologies, such as CSS (Cascading Style Sheets), to state the formatting information.
XHTML is a markup language like HTML, but was made to conform to the XML standard. XML is a widely used industry standard. XHTML was an attempt to create a language for constructing Web pages that conforms to the standards and principles of XML. You can think of XHTML as an effort to revise the HTML language using XML. HTML Vs XHTML
There are some differences between HTML and XHTML, the most well-known being that, unlike HTML, XHTML requires all tags to have a closing tag. Most HTML tags have a closing tag; some do not, such as the break tag <br>. But in XHTML these tags must have a closing tag. If the tag does not enclose any content, such as the <br> tag, you can add a forward slash (/) preceded by a space to the opening tag instead of using two tags, as in <br />. The tag <br /> is the correct XHTML version of the HTML <br> tag. All tag names are lowercase in XHTML. So, the HTML tag is only valid in XHTML as <body>. All attribute names in XHTML must also be lowercase and all of the values within tags must be with in quotation marks.
Standards in XHTML
XHTML is a single language; it consists of two major standards: XHTML Strict and XHTML Transitional. XHTML Strict requires XHTML code to strictly follow the rules of the XML standard. XHTML Transitional is not as strict as XHTML Strict and it was intentionally made to be less strict to help bridge the gap between the loose, more forgiving HTML standard of yesterday and the stricter, less forgiving XHTML standard of today.
XHTML Transitional was made to be just that - transitory - so it is not a good idea to standardize on XHTML Transitional. XHTML Transitional is more like a short-term resolution for quickly recreating existing HTML. Limitations Because XHTML is stricter than HTML and requires the use of other technologies such as Cascading Style Sheets (CSS) to create Web pages, creating Web pages using XHTML will initially take more time. XHTML is also less forgiving than HTML when a Web page’s code contains errors.
Many of today’s Web developers use specialized tools to create Web pages. Any of the tools that are more than a couple of years old may not be able to create valid XHTML Web pages without upgrading or replacing the software. Because XHTML uses CSS to format Web page elements, users must also learn how to implement CSS if they want their Web pages to resemble those created with just HTML.
In general, if we want to create Web pages that will stay alive on the Internet for a long period, we should use XHTML to ensure that our Web pages will be compatible with Web browsers of the future. If we are simply creating a Web page for short term use, we can use HTML instead of XHTML to structure and format our Web page.