Take the 2-minute tour ×

I'm trying to help a web developer I'm working with figure out what might be causing poor rendering of a site I'm helping with. It involves javascript with rotating images, and the site is all skewed at different times for different people using different operating systems and different browsers (I just checked that via browsershots).

She's been trying for quite a while to fix it, and it's pretty urgent now, so although I know next to nothing about creating or troubleshooting javascript, I decided to have a look via w3's code validator myself to see if a second set of eyes might help, and I see that a closing script tag is in upper case letters, and w3 says only lower case is allowed in xhtml. I haven't heard back from the developer yet, so, I'm curious about what others would have to say - would this 'break' the site?

And what about having duplicate content-type meta tags - there is one above the title tag and again below it - both the same. Would that be having any effect on anything on the site?

I'd appreciate any opinions or advice. Thanks in advance.

share|improve this question
First, how about posting the URL so we can see what's going on? It certainly wouldn't hurt to remove one (either one) of the content-type metas. If the validator is giving her errors, it's very important that she fix those things -- browsers can do wildly different and unexpected stuff in the presence of errors. Finally, she'd be doing herself and everybody else a huge favor if she were to forget about xhtml and go with html. –  Pete Wilson Sep 15 '11 at 18:51
Thanks, Pete. I'm all for validated code in any case, html or otherwise. I'm curious, if only for my own education, about if this particular, seemingly trivial detail would have the effect I'm talking about. I have always been trained to use lowercase, but I will never now forget that it is especially relevant when working in xhtml.I can't post a link for a number of reasons, but just picture 4 images that are randomly rotating on page load, and they're skewing all over the page and displacing everything, and sometimes not showing up at all. –  CJN Sep 15 '11 at 19:00
add comment

1 Answer

Neither problem will break the site, unless you are serving the page with an XML content type, and you almost certainly aren't. But I endorse Pete Wilson's comment. The starting point for fixing (X)HTML problems is to ensure that the page validates.

share|improve this answer
thanks, alohci, not sure which you're referring to, so: meta content type is "Content-Type" content="text/html; charset=utf-8"; doc type is !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";; site is in drupal.... <html xmlns="w3.org/1999/xhtml"; lang="en" xml:lang="en"> –  CJN Sep 15 '11 at 19:10
@CJN - What the meta tag says doesn't matter. The content type (as opposed to the charset) has to be set in the HTTP headers. But assuming that says text/html as well, all browsers will treat your carefully crafted XHTML as plain HTML, which is case-insensitive for tag and attribute names, so your concern about the upper cased script tag is unfounded. –  Alohci Sep 15 '11 at 19:16
add comment

Your Answer


