How to understand XHTML formatting
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.
An HTML editor, which may be a text editor.
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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns="http://www.w3.org/1999/xhtml">
<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:
There can only be one root <html> tag.
Attributes within HTML tags must also be lowercase and quoted such as:
Attributes must also be fully formatted like the above <div> element, they cannot be minimized such as: