Your Ad Here

we often see the website once-website on the internet, how do we differentiate between a standard html document and xhtml?

one example, if we view the source website, the difference is fundamental:

  • HTML


  • <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html>


  • The Tag can write in with letters large and small: <html>, <body>, <img>, <pre>, <br>

  • There are some tags that may be not closed: <li>, <br>



  • XHTML


  • <!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">
     


  • Tags must be written with small letters: <html>, <body>, <img>, <pre>

  • All tags must be closed, if a tag like the break, given signs / before the closing tag: <br />, /> <input, <img />