0% found this document useful (0 votes)
6 views

Comparison Chart Between XHTML and HTML

XHTML requires that documents be "well-formed", have a single root element<HTML> and the opening and closing tags are nested correctly. Additionally, attributes must be enclosed in quotes and element and attribute names in lowercase letters. In contrast, HTML allows documents to be poorly formed and missing opening tags, closing tags, or the root element.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Comparison Chart Between XHTML and HTML

XHTML requires that documents be "well-formed", have a single root element<HTML> and the opening and closing tags are nested correctly. Additionally, attributes must be enclosed in quotes and element and attribute names in lowercase letters. In contrast, HTML allows documents to be poorly formed and missing opening tags, closing tags, or the root element.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Comparison table between XHTML and HTML

XHTML Html
documents have to be "well formed" The documents may not be
XHTML documents must have a single HTML documents may not have it
root element for the entire document,
the <HTML> element.
non-empty elements (those with an There's no need
opening tag) must have a closing tag
the opening tag of empty elements must There should be no closing tag
end in " />" or there must be a closing
tag
Attribute values must be enclosed in not necessary if there are no
quotes (double or single) whitespace
references to entities in hexadecimal can be written in lowercase or
must be written in lowercase uppercase
element and attribute names must be There's no need
written in lower case

What is HTML?
HTML is the language used to develop internet pages. This language is made up
of elements that the browser interprets and displays on the screen according to its
objective. We will see that there are elements to arrange Images on a page,
hyperlinks that allow us to go to another Page, lists, tables to tabulate data, etc. In
order to create an HTML page, a simple text editor is required (in our case
notepad) and an internet browser (IExplorer, FireFox etc.), remember that you
must save the content of your notepad with the name of the file followed by the
HTML extension, we will use the browser that you are using at this precise moment
(remember that you are viewing at this precise moment moment an HTML page
with your browser)

What is XHTML?

- is a language similar to HTML, but with some differences that make it more robust
and advisable for modeling web pages. The acronym corresponds to the English
words eXtensible Hypertext Markup Language, which would mean in Spanish
something like extensible hypertext markup language.

-The original HTML language was very permissive in its syntax, so it was possible
to write its tags and attributes in many different ways. Labels, for example, could
be written in uppercase, lowercase, and even a combination of uppercase and
lowercase. The value of the tag attributes could be indicated with and without
quotes ("). Furthermore, the order in which the tags were opened and closed was
not important. The flexibility of HTML may seem like a positive aspect, but the end
result is pages with messy, difficult to maintain and very unprofessional HTML
code. Fortunately, XHTML solves these problems by adding certain rules in the
way tags and attributes are written.

You might also like