Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What is the difference between HTML and XHTML?

user-image
Question added by Feras Abualrub , Web Solutions Manager , Qistas for Information Technology
Date Posted: 2013/09/12

Basm allah alrahman alrahim

 

HTML from SGML [ HTML called SGML based , that mean extended from  Standard Generalized Markup Language  that mean SGML is the father of all hyper text markup languages HTML ] , XML extended from SGML for more special uses even it is extended with less features , XHTML extended from HTML + XML

 

Note

XHTML5 (XML-serialized HTML5) extended from XML & HTML5 

 

 

Some of differences like following [ look to language attribute difference for both you will find additional xml : , that's w3cshools Link for some differences ]

 

HTML4.01 Example

 

<p lang="fr">Jelevai la tête pour regarder lesétoiles. Leur vue apaisa peuà peu les battements de moncoeur.</p>

 

XHTML1.0 example

 

<p xml:lang="fr">Jelevai la tête pour regarder les étoiles. Leur vue apaisa peu à peu les battements de mon coeur.</p>

 

 

Example of XHTML document with language attributes:Minimal XHTML file

 

 

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML1.0 Strict//EN" "DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<title>Minimal XHTML file</title>

</head>

<body>

<p lang="fr" xml:lang="fr">Du texte en français.</p>

</body>

</html>

 

 

 you will see <?xml ?> that a different than HTML , and you will see xml:lang

 

 

 

 

 

 

 

 

 

Daanish Rumani
by Daanish Rumani , Product Manager , Publicis Sapient

What is HTML?

HTML is the language for describing the structure of Web pages. HTML gives authors the means to:

  • Publish online documents with headings, text, tables, lists, photos, etc.
  • Retrieve online information via hypertext links, at the click of a button.
  • Design forms for conducting transactions with remote services, for use in searching for information, making reservations, ordering products, etc.
  • Include spread-sheets, video clips, sound clips, and other applications directly in their documents.

With HTML, authors describe the structure of pages usingmarkup. The elements of the language label pieces of content such as “paragraph,” “list,” “table,” and so on.

What is XHTML?

XHTML is a variant of HTML that uses the syntax of XML, the Extensible Markup Language. XHTML has all the same elements (for paragraphs, etc.) as the HTML variant, but the syntax is slightly different. Because XHTML is an XML application, you can use other XML tools with it (such as XSLT,a language for transforming XML content).

 

Source: http://www.w3.org/standards/webdesign/htmlcss

Akram Kamal
by Akram Kamal , IT Technical Support , AlSafa Specialized Hospital

XHTML  improved form HTML if you familiar with HTML you can deal with XHTML there are bit different between them in HTML allows among other things,uppercase, lowercase, or mixed case letters in tags <body> and <BODY> are both correct for example, and permit unclosed tags so you can use a single <p> tag without the closing </p> to create paragraph that's mean HTML flexibility more than XHML.

XHTML has strict rules, in general difference in declaration tags.

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.