HTML/XHTML/CSS Forums?

Talk about stuff specific to the site -- bugs, suggestions, and of course praise welcome.
User avatar
chrisgeleven
Posts: 3117
Joined: November 8th, 2002, 6:55 pm
Location: Manchester, NH USA
Contact:

HTML/XHTML/CSS Forums?

Post by chrisgeleven »

Would be nice if we could have a few forums dedicated to discussion of web design and questions/discussion on writing standards compliant code. I for one would love to see everyone's web sites that they designed using XHTML and CSS so I could learn even more.
User avatar
velociraptor
Posts: 52
Joined: November 6th, 2002, 7:46 am

I think this is a bit too offtopic for MZ

Post by velociraptor »

I mean, there are sites, forums, and groups dedicated to web design, css etc.
BTW, why XHTML? There is no need for that if you use standard-compliant HTML. XHTML is *not* the better or newer HTML, it is just a solution for helping you process/generate HTML as XML.
User avatar
Stefan
Posts: 2051
Joined: November 5th, 2002, 2:46 am

Re: I think this is a bit too offtopic for MZ

Post by Stefan »

Velociraptor wrote:There is no need for that if you use standard-compliant HTML. XHTML is *not* the better or newer HTML


Actually when dealing with CSS XHTML/XML IS better then old HTML.

To many things are optional (=added automatically) in HTML markup which will botch up your CSS, even if the HTML is 100% Valid leaving you to pull your hair in frustration of why it happens. Many of those errors are caught by the validator if you are using XHTML.

XML forcing you to not take shortcuts with sloppy markup will in the end save you time.

Eg consider the following code

<div>
<p style="color:red"> This text should be red
<div> You might think that this text should aso be red, but it won't be, since as soon as the DIV tag gets placed an automatic "</p>" is added</div>

You might also think that this text should be red if not knowing about that automatic "</p>" beeing added.

However if you where validating this as XHTML the validator would have thrown an error that you are missing an "</p>" which could spare a newbie possibly several hours of debugging as well as teach him that you can't put a "<div>" in a "<p>"
</div>
User avatar
velociraptor
Posts: 52
Joined: November 6th, 2002, 7:46 am

agreed, but ...

Post by velociraptor »

I agree that this can be a motivation for people to develop using XHTML instead of plain HTML, but still, there is nowhere a *necessity* to use one or the other. After all you also risk to get *more* problems with XHML at the current time, if you want to make your web page compatible with older browsers like NS 4.x. My argument is just that the statement "everybody should use XHTML and CSS" should be replaced by "everybody should avoid non-standard code, if possible". I would also argue that if you have the choice between absolute standards-compliance and making the site browsable by as many browsers as possible, you should go for the latter. Some non-standard stuff *forces* the user to use a specific browser, other non-standard stuff makes it possible to browse with more browsers.
User avatar
Stefan
Posts: 2051
Joined: November 5th, 2002, 2:46 am

Re: agreed, but ...

Post by Stefan »

Velociraptor wrote:but still, there is nowhere a *necessity* to use one or the other.


No definitly not, it's a matter of personal preferance. But the improved effectivness of the W3C validator is why I made the switch from HTML to XHTML a few years back, and I definitly recomend others to do the same.

After all you also risk to get *more* problems with XHML at the current time, if you want to make your web page compatible with older browsers like NS 4.x.


Hmm, exactly what problems would that be? Don't recall bumping into any NS 4 HTML vs XHTML incompabilities following the W3C XHTML compability recomendations.

My argument is just that the statement "everybody should use XHTML and CSS" should be replaced by "everybody should avoid non-standard code, if possible".


Yes, that is a better point of view. =)
But incidently that often means to use XHTML and CSS becuse it's most practical :D

I would also argue that if you have the choice between absolute standards-compliance and making the site browsable by as many browsers as possible, you should go for the latter.


I would say that actually depends a bit on the functionallity of the site.
If you have an online comercial site that sells stuff, obviously the page working in all browsers is priority 1, or else you lose income.
However in a noncomercial enviroment (private homepages etc), I think standards are more important then providing 100% compability with old browsers. Of cource one should preferably do it in a way that makes the page "degrade gracefully" in old buggy browers (ie the page gets to look uglier and might lose some extras, but the content is still accessible).

If people don't lose anything by using a serverly outdated browser, where is the motivation to upgrade? And if users don't upgrade their old crappy browsers, how will the comercial sites ever be able to take the step and use valid markup?
Arvid Axelsson
Posts: 254
Joined: November 4th, 2002, 6:07 pm

Re: I think this is a bit too offtopic for MZ

Post by Arvid Axelsson »

Stefan wrote:Actually when dealing with CSS XHTML/XML IS better then old HTML.

To many things are optional (=added automatically) in HTML markup which will botch up your CSS, even if the HTML is 100% Valid leaving you to pull your hair in frustration of why it happens. Many of those errors are caught by the validator if you are using XHTML.

XML forcing you to not take shortcuts with sloppy markup will in the end save you time.

I wouldn't call them sloppy. Those who are confused by tag omission are free not to use it in HTML. The "X" changes nothing there. At least if you aren't using the XHTML content-type – leaving many unable to see it – in which case it's practically nothing else than HTML with various syntax errors anyway.

Stefan wrote:No definitly not, it's a matter of personal preferance. But the improved effectivness of the W3C validator is why I made the switch from HTML to XHTML a few years back, and I definitly recomend others to do the same.

Then there are Tidy and other tools to check more things than the validator does.
Last edited by Arvid Axelsson on September 28th, 2003, 5:35 am, edited 1 time in total.
User avatar
Stefan
Posts: 2051
Joined: November 5th, 2002, 2:46 am

Re: I think this is a bit too offtopic for MZ

Post by Stefan »

Arvid Axelsson wrote:Those who are confused by tag omission are free not to use it in HTML.


You are missing the point. The validator won't aid you with an error warning at all times due to improper nesting in HTML since you are alowed to ommit some tags.
That can lead to simple logical as well as typing mistakes slipping through validation which would be caught in XHTML parsing mode.


Last time I checked, W3C's validator said that it has some "cave-ats" for XML. So it would rather have less effectiveness.


The caveats are explained here and doesn't have very much to do with eg plain XHTML 1.0
http://www.jclark.com/sp/xml.htm

Then there are Tidy and other tools to check more things than the validator does.


What things? Never used Tidy :)
Arvid Axelsson
Posts: 254
Joined: November 4th, 2002, 6:07 pm

Re: I think this is a bit too offtopic for MZ

Post by Arvid Axelsson »

Stefan wrote:You are missing the point. The validator won't aid you with an error warning at all times due to improper nesting in HTML since you are alowed to ommit some tags.


Then it's not improper nesting, is it?

Stefan wrote:What things? Never used Tidy :)


Me neither. http://www.w3.org/People/Raggett/tidy/
User avatar
Stefan
Posts: 2051
Joined: November 5th, 2002, 2:46 am

Re: I think this is a bit too offtopic for MZ

Post by Stefan »

Arvid Axelsson wrote:
Stefan wrote:You are missing the point. The validator won't aid you with an error warning at all times due to improper nesting in HTML since you are alowed to ommit some tags.


Then it's not improper nesting, is it?


Yes, that is exatly what I said. But in XHTML it would be improper nesting.

Check my above simple examplecode which shows a possible logical error in the coding where your CSS might not do what you would expect it to do, if you don't have a deep knowledge of how a (x)HTML document should be structured.
Post Reply