Jump to content

XHTML Tutorial and Reference


kaijim

Recommended Posts

  • 6 months later...

That was not sufficient tutorial so you are requested that you should add more information so that it is sensible for any webdeveloper.RegardsRoberto XananaRX

Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...

Im with RX.. The tutorial is really a quick start but xhtml2.0 stuff is missed in it. Yesterday i was reading one article on web and surprised to find 5 xhtml dtds exist instead of 3 as given in w3schools tutorial. Later learnt xhtml 2.0 things r not mentioned in this tutorial..That wud be a great help if u could include xhtm2 details in it.thanksvnay.v_nai@yahoo.com

Link to comment
Share on other sites

If you did just a little more researching, you would know that XHTML 2.0 is still a working draft. It is too early for anyone to teach it, scince all of the stuff is still not clear.Currently there are only 4 DTDs. The three W3Schools mentions and XHTML1.1's which was mentioned in another W3Schools tutorial.There are also two HTML DTDs (Scrict and Loose) and that's probably the thing W3Schools missed, but then again, who cares? You should use XHTML 1.0 anyway.By the way, older versions of HTML have DTDs too, but they were only used for validation as is the case with HTML4. However, the XHTML DTD also make the CSS behave as closely as possible to the CSS-on-XHTML spec. That is why W3Schools says you really need the DTD in order for XHTML to work.There is stuff they've missed, but nothing so critical for you not knowing the language.

Link to comment
Share on other sites

There are also two HTML DTDs (Scrict and Loose) and that's probably the thing W3Schools missed, but then again, who cares? You should use XHTML 1.0 anyway.
Why is that? If I'm going to make a website, using the SGML for structure and CSS for presentation, what's my motivation for using XHTML 1.0 over HTML 4.01? What benefits does it have, considering today's browser market? I realize that it conforms to XML, but big deal. Why is that a benefit? If I'm still going to use CSS and not worry about things like XSLT, then why should I bother? If XML somehow makes it more accessible, are there any devices or products on the market today that actually take advantage of that, and display XHTML pages better then they do a well-formed and validating HTML 4.01 page?I mean apart from the fact that it is a newer spec, and considering the fact that webservers will not be sending the correct mime type for several years at least, is there any real motivation to use it?
Link to comment
Share on other sites

Yes. Any language that can deal with XML documents can deal with XHTML document as if it's an XML document. So let's say you want to grab all links' URLs. With a complex and rather weird regular expression you would achieve that, but there may always be some sort of leak. If the XML parser was used, an XPath expression like

//a/href

would serve perfectly and flawlessly for that job. But if the document is not a well formed XML document, this wouldn't work.

Link to comment
Share on other sites

  • 1 year later...

XHTML is really just HTML made to follow the rules of XML, things like closing empty tags with /> (e.g. <br /> instead of <br>), and compulsory attributes (e.g. alt on <img /> tags).

  • Like 1
Link to comment
Share on other sites

  • 1 year later...
I know how to write HTML, by the ways I try to read W3schools' tutorial about XHTML but i do not understand. :)
it's pretty much spelled out right at the beginning...XHTML elements must be properly nested (matching opening/closing tag's, and closing a tag within a tag first...)XHTML elements must always be closed (all tags must have '/' before they close)XHTML elements must be in lowercase (simple enough)XHTML documents must have one root element (must be withing a <html></html>)pretty strightforward for the most part, I think. The rest is listed thought the tut. Anyway, code an HTML page with an XHTML DTD and see what the valaditor spits back out at you.also,Attribute names must be in lower case Attribute values must be quoted Attribute minimization is forbidden The id attribute replaces the name attribute The XHTML DTD defines mandatory elements
Link to comment
Share on other sites

  • 2 years later...

The W3Schools pages say that the HTML <p> </p> set of tags give a line feed plus an empty line between paragraphs. I've tried on Firefox and IE and both of these act exactly the same for these tags as for a <br /> tag. Is there a difference?

Link to comment
Share on other sites

Then there is no real difference between their actions ? Neither of them gives a blank line (I think they used to before HTML5).

Edited by PhilOfPerth
Link to comment
Share on other sites

The actual difference between <p></p> and <br> is that <p> indicates that the text is a paragraph while <br> tells the browser to put a line break there.
Ah, now I see it... the break is an "empty tag" which just does its thing, no ifs or buts, and you can't do much else with it, whereas a paragraph can be styled to do all sorts of things.(but the question remains, does paragraph, by default, leave a blank line, as W3Schools states? It doesn't on my machine).
Link to comment
Share on other sites

does paragraph, by default, leave a blank line, as W3Schools states? It doesn't on my machine
I think its default behaviour is adding a blank line. It works like that for me.
Link to comment
Share on other sites

  • 2 weeks later...
I know how to write HTML, by the ways I try to read W3schools' tutorial about X HTML but i do not understand. :(
Well, X HTML stands for Extended HTML or Extensive Hyper Text Mark up language, which means it is an extended version of HTML just to create a common environment for the essence of building up websites "HTML infrastructure" and create a common soil for all browsers by validating X HTML through the World Wide Web Consortium ValidatorThank you:)
Link to comment
Share on other sites

  • 10 months later...
I know how to write HTML, by the ways I try to read W3schools' tutorial about XHTML but i do not understand. :(
Link to comment
Share on other sites

It is very easy to read the theory part and write the HTML codes too.

  • Like 1
Link to comment
Share on other sites

  • 10 months later...
  • 3 weeks later...
  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...