Comparison Chart Between XHTML and HTML
Comparison Chart 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.