On May 27, 10:31 pm, dhoover <dh.ferm...@gmail.com> wrote:
> I am a bit perplexed at why a simple bit of code I have is firing in
> HTML but not in the equivalent XHTML.

Because it is extremely likely that your XHTML markup is being treated
as HTML, in which case...

[...]
> And here is the XHTML file (that does not work as expected):
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>                       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
> strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
> <head>
> <title>Text Demo</title>
> <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
> <link rel="stylesheet" type="text/css" href="stylesheets/default.css" /
>
> <script type="text/javascript" src="js/jquery-1.3.2.min.js" />

is invalid markup.  If you are loading the file locally, some browsers
will use the DOCTYPE or file extension to determine if the markup as
XHTML.  However, the vast majority of web servers are configured to
serve text/html as the content type in the response header.  That
overrides the DOCTYPE.


--
Rob

Reply via email to