answersLogoWhite

0

What is the different between HTML and xHTML?

Updated: 8/18/2019
User Avatar

Wiki User

12y ago

Best Answer

XHTML opening tags are 'closed' again instantly (although they are closed again further down) e.g. .

The difference between HTML, and XHTML is that XHTML is XML and HTML combined. XHTML is the strict version of HTML.

Here is a script with XHTML:

"http://WWW.W3C.Org/TR/Xhtml1/Xhtml1-Frameset.dtd" />

Mark Elliot Zuckerberg (born May 14, 1984) is an American software developer and internet entrepreneur. He is best known for creating the social networking site Facebook, of which he is chief executive and president. It was co-founded as a private company in 2004 by Zuckerberg and classmates Dustin Moskovitz, Eduardo Saverin, and Chris Hughes while they were students at Harvard University. In 2010, Zuckerberg was named Time magazine's Person of the Year.

and now with HTML :

Mark Elliot Zuckerberg (born May 14, 1984) is an American software developer and Internet entrepreneur. He is best known for creating the social networking site Facebook, of which he is chief executive and president. It was co-founded as a private company in 2004 by Zuckerberg and classmates Dustin Moskovitz, Eduardo Saverin, and Chris Hughes while they were students at Harvard University. In 2010, Zuckerberg was named Time magazine's Person of the Year.

notice a difference?

EDIT: The newer answer actually contains CSS. This is something separate. XHTML is just a newer, improved version of HTML.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

There are 4 main differences between HTML and XHTML.

  1. In XHTML, all elements must be lowercase. In HTML, it's perfectly legal to use caps in your tags, but in XHTML all tags, elements, and attributes MUST be lowercase.
  2. All elements must have a closing tag in XHTML. If you have an empty element that doesn't have a closing tag in HTML (such as or
    ), you close it in XHTML by adding a forward slash to the end (like or
    ).
  3. All XHTML elements must be properly nested. In HTML, you can get away with this:

    This is some text

    You can't do this in XHTML, as tags must be closed in the inverse order they were opened. In order to be valid XHTML, the above example would have to be:

    This is some text

  4. The document must be properly nested. In other words, the page should start with the opening HTML tag and end within the closing HTML tag. The head information should be between the opening and closing HEAD tags, and the page content needs to be properly nested within the BODY tag.
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the different between HTML and xHTML?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Html and xHTML?

HTML and XHTML are two different languages used for web and application design. XHTML was a popular choice from about the year 2000, to 2011. HTML 5 is intended to replace XHTML. XHTML followed the basic rules of XML-based languages. HTML (both prior and since) do not.


Is html a replacement for xhtml?

No. HTML existed before XHTML. XHTML combines XML and HTML, so it is an advancement on HTML.


What are the differences between htmlxmlsgml and xhtml?

basikly xhtml is a mics of html and xml. the difference in html and xhtml is that xhtml is a more strict on the syntax and defined as a xml document. xml is a self defined language... in short it is a strikter html in xml format...


What are the requirements for valid XHTML coding syntax?

The requirement for a valid XHTML is that all the tags should be closed. This is actually the difference between HTML and XHTML.


Difference between HTML and xHTML 1.0?

HTML uses SGML-like syntax. XHTML 1.0 uses XML syntax. HTML uses HTML DOM, XHTML uses XML DOM. There are small differences between those. Other than that, they're identical. They use same tags, attributes, have same semantics. XHTML 1.0 specification is very short and refers to HTML 4 specification for all important matters.


What are the different kinds of HTML?

Some different technologies that are built on top of HTML are DHTML - Dynamic HTML, XHTML - Extended HTML, XML - Extended Markup Language etc.


Is xHTML is the successor to HTML?

No, XHTML is a parallel language to HTML. XHTML is a XML language definition where tags have similar meanings to corresponding HTML tags. A crude analogy would be that XHTML and HTML are half-brothers; Lot's of similarities but also distinct differences. The successor of HTML is HTML5, the successor of XHMTL is XHTML5.


What language was used to create XHTML?

HTML is in XHTML, some argue that XHTML is it's own markup


Is xHTML the same as HTML strict and what is a HTML frameset declaration?

Yes, XHTML is just the stricter form of HTML. It means that you have to close all the tags that you have opened.


What are some tips for writing XHTML?

# Write up multiple XHTML documents, attempting to not make any mistakes. # Write multiple HTML documents, and transform them into XHTML documents. # Browse forums or other online sources for HTML documents (or incorrect XHTML documents) that need help, markup-wise. # Take on projects involving XHTML coding.


XHTML is the combination of what?

XHTML is a combination of largely HTML and a small portion of XML.


Is there any reason to learn HTML before xhtml?

No, because they are essentially the same thing. HTML came before XHTML, and can be ill-formed but still acceptable. XHTML is just well formed HTML with the inclusion of a DTD at the very top.