Share
Explore BrainMass

HTML and XHTML

HTML and XHTML

Research and identify two fundamental differences between HTML and XHTML. I need to provide examples: Find at least two HTML tags that are not valid in XHTML. What are some ways I can check to ensure that my code is valid XHTML? In answering these questions, be sure to identify what the function of the tag is that appears atop web page source codes and identify some of the different doctypes available to me in XHTML and what they mean.

Solution Preview

Please see the attached file.

Question: HTML and XHTML

Research and identify two fundamental differences between HTML and XHTML. I need to provide examples: Find at least two HTML tags that are not valid in XHTML. What are some ways I can check to ensure that my code is valid XHTML? In answering these questions, be sure to identify what the function of the tag is that appears atop web page source codes and identify some of the different doctypes available to me in XHTML and what they mean.

I just need a lot of help in this class!!!!!!!!! I do not need you to do it for me but I need where to find the information I need. Hints would be very helpful.

Technology can get the best of you - take each question slowly though and don't think about the overall assignment. Tackle one question at a time and I promise it will be easier for you to handle. No need for me to copy and paste everything from this site; loads of information here for you.

Other sources utilized

http://annevankesteren.nl/2004/06/invalid-html
Surfin Safari - http://webkit.org/blog/?p=68
The HTML Sourcebook - http://www.answers.com/topic/the-html-sourcebook-the-complete-guide-to-html
Comparison of layout engines HTML- http://www.answers.com/topic/comparison-of-layout-engines-html
Comparison of layout engines XHTML - http://www.answers.com/topic/comparison-of-layout-engines-xhtml
HTML vs. XHTML FAQ's - http://www.w3.org/MarkUp/2004/xhtml-faq

Answers.com is a great site to offer definitions as well as offering the reader other useful links about the topic you are investigating:

HTML - http://www.answers.com/HTML%20
HyperText Markup Language) The document format used on the Web. Web pages are built with HTML tags (codes) embedded in the text. HTML defines the page layout, fonts and graphic elements as well as the hypertext links to other documents on the Web.

XHTML - http://www.answers.com/topic/xhtml
(EXtensible HTML) A markup language for Web pages from the W3C. XHTML combines HTML and XML into a single format (HTML 4.0 and XML 1.0).

Differences from HTML

The changes from HTML to first-generation XHTML 1.0 are minor and are mainly to achieve conformance with XML. The most important change is the requirement that the document must be well formed and that all elements must be explicitly closed as required in XML. In XML, all element and attribute names are case-sensitive, so the XHTML approach has been to define all tag names to be lowercase. This contrasts with some earlier established traditions which began around the time of HTML 2.0, when many used uppercase tags. In XHTML, all attribute values must be enclosed by quotes (either 'single' or "double" quotes may be used). In contrast, this was sometimes optional in SGML, and hence in HTML, where quotes may be omitted in some circumstances. XML dispensed with the intricate rules for determining when quotes were required or when they could be omitted by simply requiring them in all cases . All elements must also be explicitly closed, including empty (aka singleton) elements such as img and br. This can be done by adding a closing slash to the start tag: <img /> and <br />. Attribute minimization (e.g., <option selected>) is also prohibited as the attribute "selected" contains no explicit value; instead, use <option selected="selected">. More differences are detailed in the W3C XHTML 1.0 recommendation [2].

Find at least two HTML tags that are not valid in XHTML?

What are some ways I can check to ensure that my code is valid XHTML?
XHTML must be coded more rigorously than HTML. Whereas HTML is an application of SGML, a very flexible markup language, XHTML is an application of XML, a more restrictive subset of SGML. Because they need to be well-formed (syntactically correct), XHTML documents allow for automated processing to be performed using a standard XML library?unlike HTML, which requires a relatively complex, lenient, and generally custom parser (though an SGML parser library could possibly be used). XHTML can be thought of as the intersection of HTML and XML in many respects, since it is a reformulation of HTML in XML.

...what the function of the tag is that appears atop web page source codes and identify some of the different doc. types available to me in XHTML and what they mean.

For a document to validate, it must contain a Document Type Declaration, or DOCTYPE. A DOCTYPE declares to the browser what Document Type Definition (DTD) the document conforms to. A Document Type Declaration should be placed at the very beginning of an XHTML document, even before the <html> tag. The system identifier part of the DOCTYPE, which in these examples is the URL that begins with "http", need only point to a copy of the DTD to use if ...

Solution Summary

MS Word Document - Fundamental differences between HTML and XHTML; at least two HTML tags that are not valid in XHTML; ways you can check to ensure that your code is valid XHTML; different doctypes available to me in XHTML and what they mean - 8 Pages
2761 Words
52 Paragraphs
16 References

$2.19