I have recently uploaded a site to www.playlacrosse.co.uk
the problem is that the site does not validate.
The HTML templates on its own validates. The CSS files both validate, but added together with Modx tags the site does not validate.
I wondered if someone might help me understand this
Thanks
-
☆ A M B ☆
- 24,524 Posts
Snippets often generate content which is inserted into the template. The snippet’s content may or may not validate. The WebLogin snippet, for example, inserts some javascript that does not validate.
No reason why i’m using i’m using strict, I don’t even understand the difference.
I’m not a web developer. I just like to have a go, or don’t know anyone else who can do it.
Mmm on the
tags, i’m not sure where come from unless its the TinyMCE editor creating them, as copy is just dropped into there.
I have no idea why the site is loading id tags more than once - that will require more investigation.
When a site is just flat pages I can go in and identify where the error lies, in a dynamic site like this I find it difficult as bits are generated form all over the place.
Hi,
The page is still not valid - in fact it is now worse and does not show correctly in Internet Explorer.
You say that w3c validator tells you why the page is not valid which is fine. I understand that
should be
and that div="id" should only be used once.
The problem is that I do not know where these additional tags are coming from. I have not added them, they are not in the template. Modx seems to be creating them itself and its making my site invalid.
Has anyone else had this?
-
MODX Staff
- 2,502 Posts
I don’t want to get into a religious debate but if you are learning HTML/CSS now, then Strict Doctypes are a must. The biggest reason is that browsers like IE6 and lower will enter quirks mode when issued a transitional doctype and therefore lead to unpredictable browser compatibility issues--especially where the box model is concerned.
The transitional doctype was intended as a transition between old versions of markup and the new standards not as a default minimum. If you are creating new documents there is no reason you can’t make them work with a strict doctype. You can use some inline JS without the cdata wrapper if you correctly identify the document as text/html in the XHTML standard and validate.
99% of validation issues are a result of incorrect use of ids, improperly nested elements and using obsolete or deprecated attributes like name or border within an element tag.
It is not pedantic to build things to a standard. Do you consider local building codes pedantic? The standard is to ensure a minimum agreement on the methods and execution. The HTML/XHTML standards are not perfect and there may be reasons to deviate on an educated basis from the standard to achieve a result.
If a script that is necessary to complete a project can’t be repaired to meet the strict doctype or its not in the client budget go ahead and use the transitional doctype since it is for those cases that it was intended but if you use it because you think that the strict doctype is just for anal-retentive fusspots you are very wrong.
Personally nearly all but one of the projects I’ve done in the last year have been HTML 4.01 strict and many people will scratch their head saying but that’s old. XHTML was not intended to replace HTML 4.01 but to allow use of XML features within the HTML realm. HTML 5 is at least a year out (or longer since the steering comittee is full of arrogant anal-retentive fusspots).
Strict doctypes are not an annoyance, use them unless the project can’t employ them not because they’re too restrictive (they’re not).
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub
-
MODX Staff
- 2,502 Posts
Quote from: ganeshXL at Aug 12, 2008, 08:27 AM
Wow, did I step on your toes there?
No. I think I misunderstood your advice. I ended coming off a little crazy no offense taken or intended.
Quote from: ganeshXL at Aug 12, 2008, 08:27 AM
When someone says something like that, it clearly means he won’t bother learning anything about doctypes, or semantic markup. Somebody with that background/attitude just wants to get things done (in this case, get things done with modx).
I may be wrong, but I guess he just wants to fix the errors and move on. Not spend the next couple of weeks becoming a webdev pro. If you just want a quick personal site / blog, chances are you don’t want to learn about CDATA et al. Remember, the web is a democratic medium.
Based on your points. c-m should just forget validation. doctype is irrelevant if you don’t care or understand the difference between trans and strict. If getting it done is the goal don’t worry about making it valid. Just make it look good in browsers and call it a day.
When I was starting out I was just happy that a design looked and worked as it should in IE and (then Opera 0.80 ) so I do understand the position.
@ganeshXL you are right the web is for many voices and I felt like shouting. I have regained my pragmatic sanity. Cheers all.
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub