XHTML is a standard way to format HTML pages. It ensures that HTML pages are not only legal in that they will generate content, but are written in a more uniform way. There are few requirements to writing XHTML pages, but they may be verified so that they indeed conform to the standard. XHTML stands for Extensible Hypertext Markup Language, and can be seen as HTML that fits XML requirements.
Requirements
An HTML editor, which may be a text editor.
Procedure
At the top of your XHTML document, you must include the “DOCTYPE” and XML namespace attributes, such as:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns="https://www.w3.org/1999/xhtml">
Next, the <html>, <head>, <title>,
and<body>
HTML tags must be included in the page.
Nesting order of elements may not be rearranged. Each HTML element/tag must also have a closing tag.
HTML tags must also be lowercase, such as:
</body>
There can only be one root <html> tag.
Attributes within HTML tags must also be lowercase and quoted such as:
<div class="classname">
Attributes must also be fully formatted like the above <div> element, they cannot be minimized such as:
<option selected>