This is a discussion on What is XHTML? within the XML and SOAP forums, part of the Web Development category; Hi friends, Can any one tell me What is XHTML? Thanks devarajan.V...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Is simple words, XHTML, or Extensible HTML, is HTML 4 with XML rules applied to it (each begin tag must have an end tag, attribute values in single/double quotes, etc.). However, the overall vision of XHTML is much more than that. In addition to using XML syntax for HTML, XHTML also encloses specifications such as XHTML Basic (minimal set of modules for devices such as PDAs), XForms (represents the next generation of forms for the Web, and separates presentation, logic, and data), XML Events (provides XML languages with the ability to uniformly integrate event listeners and associated event handlers), etc. |
| |||
| hi, I have given an elaborate information about XHTML The evolution of HTML has essentially stopped. Instead, HTML is being replaced by a new language, called XHTML. XHTML is in many ways similar to HTML, but is designed to work with the new eXtensible Markup Language, or XML, that will soon serve as the core language for designing all sorts of new Web applications, in which XHTML will be only one of many "languages." But, XHTML is designed to work with these other language, so that different documents, in different languages, can be easily mixed together. For this to work, the rules for writing HTML documents had to change. These rules are simple, and are as follows: 1. All tag and attribute names must be in lowercase. Thus, you can't write <A HREF="foo.html">...</A> but must instead write this in lowercase, as : <a href="foo.html">...</a> 2. "Empty" tags must be written with an extra slash at the end. An empty tag is one like <br> or <img src="foo.html"> that doesn't have a </br> or <img> to end it. In XHTML, such tags must be written as: <br />, and <img src="foo.gif" />. 3. You can never omit an end tag. With HTML, you could sometimes leave off an end tag, as in <p> ..... paragraph text <p> ..... more paragraph text With XHTML, you must always put in the end tag, so that the preceding must be written as: <p> ..... paragraph text </p> <p> ..... more paragraph text </p> 4. Attributes must always have a value. In HTML you can sometimes omit atttibute values, as in <hr size="2" noshade> in XHTML, this would need to be written as: <hr size="2" noshade="noshade" /> 5. Attributes values must always be quoted.. In HTML you can sometimes omit the quotes,as in <hr size=2> in XHTML, this would need to be written as: <hr size="2" /> That's about it -- there are a few more subtle details, but essentially if you follow the above rules, then the documents you write are acceptable as XHTML. Thus it's easy to write up Web pages using the XHTML format -- they will work with today's HTML browsers, and are easily upward-compatible for the next-generation of Web browsers.
__________________ Venkat knowledge is Power |
| |||
| Short for Extensible Hypertext Markup Language, a hybrid between HTML and XML specifically designed for Net device displays. XHTML is a markup language written in XML; therefore, it is an XML application. XHTML uses three XML namespaces (used to qualify element and attributes names by associating them with namespaces identified by URI references. namespaces prevent identically custom-named tags that may be used in different XML documents from being read the same way), which correspond to three HTML 4.0 DTDs: Strict, Transitional, and Frameset. XHTML markup must conform to the markup standards defined in a HTML DTD.
__________________ S.VinothkumaR Behind me is infinite power, Before me is Endless Possibility, Around me is Boundless Opportunity, Why should I fear! |
| |||
| XHTML is a stricter form of HTML and as such is a subset of XML which is an extremely useful, powerful and very strict way of marking up pure data. The headers you sometimes see along with XHTML code declare what exactly the rules are.. for instance, that <a> is an anchor. In XML you can declare your own rules. XHTML is significantly better than HTML, as it encourages good practice. Where it doesn't allow things that HTML does, it's likely there's a good reason.. for instance not using target="_blank". These things then in turn impact on the sites accessibility, consistency, search engine performance etc etc. |
| |||
| XHTML (eXtensible HyperText Markup Language) is the W3C's new version of HTML. It is the reformulation of HTML 4.0 as an application of XML, containing a family of current and future document types and modules that reproduce and extend the capabilities of HTML. XHTML provides the framework for future extensions of HTML, with the aim of replacing HTML in the future.
|
| |||
| difference between html & xhtml is :- xhtml element must always be closed . empty element must also be closed. xhtml element must be in lower. xhtml must have one root element. |
| |||
| The difference is only seen by the people creating the pages (Web designers, programmers, etc.) and focuses on “forgivability”— HTML allows for some ugly code (mixed-case tags like <BoDy>, improperly nested elements, and unclosed tags), while XHTML does not. If you write HTML, it’s probably a good idea to start using XHTML practices anyway.
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| Example of valid HTML: <p>This is a paragraph Equivalent in XHTML: <p>This is a paragraph</p> Tags that don’t contain data (like breaks, images, and horizontal rules) should also be closed in HTML. There’s no need to write an opening and closing tag, though. We can use the perfectly acceptable shortcut: <!— Examples of properly closed XHTML tags --> <!—Properly closed image --> <img src=”someimage.gif” alt="An image" /> <!—Properly closed break tag --> <br /> <!—Properly closed horizontal rule --> <hr />
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| In HTML, the following code might display exactly as you intended: <strong><em>Here’s some bold and italicized text</strong></em> Although this might work, it’s not “good” code. And for the purposes of this article, not valid XHTML either. To complete your XHTML training, simply make sure your tags are properly nested: <strong><em>Here’s a valid XHTML version of bold italicized code</em></strong>
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| HTML 4 has been reformulated into XHTML 1.0. XHTML is HTML 4 written as an XML application. There are two primary parts to XHTML: * HTML 4 HTML 4 is a markup language used for displaying text and documents across different platforms and machines. It was originally intended for a very specific audience, and has expanded to include hypertext, multimedia, as well as the style of the documents displayed. * XML XML is an extensible markup language that was developed to retain the flexibility and power of HTML while reducing most of the complexity. XHTML combines the flexibility of HTML with the extensibility of XML. But what does this mean? In my tags for one browser article, I wrote about HTML tags that are only viewable in one browser or another. Some of these tags had been brought into the HTML 4.0 DTD, and others had not, but the result of using these tags is that your pages will never look the same in all browsers. The only solutions that an HTML writer has are: not use those tags, use those tags and state that the page is meant for one browser or another, or write multiple pages and use scripting techniques to direct readers to the appropriate pages. With XHTML this is not necessary. With XHTML, if you find a need for a new markup tag, you simply define it in an XHTML module and use it in your page as you would any other HTML tag. You can also use XHTML to markup the code as appropriate for the (XHTML compatible) browser that is viewing it.
__________________ QA Test Management |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How many of you are using XHTML? | abhilashdas | Web Design Help | 5 | 10-13-2007 02:01 PM |