## Differences Between XHTML and HTML
### Document Structure
* XHTML DOCTYPE is mandatory
* The xmlns attribute in `` is mandatory
* ``, ``, `
`, and `` are also mandatory
### Element Syntax
* XHTML elements must be properly nested
* XHTML elements must always be closed
* XHTML elements must be in lowercase
* XHTML documents must have one root element
### Attribute Syntax
* XHTML attribute names must be in lowercase
* XHTML attribute values must be quoted
* XHTML attribute minimization is forbidden
* XHTML images must have an alt attribute
---
## XHTML Documents Must Have a DOCTYPE Declaration
An XHTML document must have a DOCTYPE declaration.
The complete XHTML document structure is as follows:
```html
Document title
Document content
```
---
## XHTML Elements Must Be Properly Nested
In HTML, some elements can be improperly nested within each other, like this:
```html
This text is bold and italic
```
In XHTML, all elements must be properly nested within each other, like this:
```html
This text is bold and italic
```
---
## XHTML Elements Must Always Be Closed
In HTML, some elements may not have a closing tag, like this:
```html
This is a paragraph
This is another paragraph
```
In XHTML, all elements must be closed, like this:
```html
This is a paragraph
This is another paragraph
```
**Empty elements must also be closed:**
```html
A line break:
A horizontal rule:
An image:

```
---
## XHTML Elements Must Be in Lowercase
In HTML, tags and attributes can be uppercase or lowercase, like this:
```html
This is a paragraph
```
In XHTML, tags and attributes must be in lowercase:
```html
This is a paragraph
```
---
## XHTML Attribute Names Must Be in Lowercase
In HTML, attribute names can be uppercase or lowercase, like this:
```html
```
In XHTML, attribute names must be in lowercase:
```html
```
---
## XHTML Attribute Values Must Be Quoted
In HTML, attribute values may not be quoted, like this:
```html
```
In XHTML, attribute values must be quoted:
```html