HTML and XML Syntax for HTML5 — What's the Difference?

Main differences between HTML and XML syntax:

 HTMLXML
1.End tags can be "implied"
Closing elements that have implied end tags

<img src="images/drink.jpg" alt="Lake" >

<ul>
    <li>coffee
    <li>tea
</ul>

End tags always required
(even for "empty" elements)

<img src="images/drink.jpg" alt="Lake" />

<ul>
    <li>coffee</li>
    <li>tea</li>
</ul>

2.Start tags can be "implied"
<!DOCTYPE html>
<head>
<title>My Document</title>
<body>
<h1>My Document</h1>
Start tags always required
<!DOCTYPE html>
<html>
<head>
<title>My Document</title>
</head>
<body>
<h1>My Document</h1>
</body>
</html>
3.Element and attribute names are not case-sensitive

<IMG SrC="images/lake.jpg" aLT="Lake" >

Element and attribute names are case-sensitive

<img src="images/lake.jpg" alt="Lake" />

4.Attribute values do not need to be in quotes if the values contain alpha-numeric characters only

<img src=images/lake.jpg alt=Lake >

Attribute values must always be in quotes
 

<img src="images/lake.jpg" alt="Lake" />

Best Practices for Starting Out