Validate

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
Josh
Regular
Posts: 110
Joined: Mon Jul 18, 2005 3:02 pm
Location: Berlin
Contact:

Validate

Post by Josh »

My blog is not XHMTL transitional because of one error in line 4:

"Missing xmlns attribute for element html. The value should be: http://www.w3.org/1999/xhtml"

http://validator.w3.org/check?uri=http% ... ose=1&st=1

Can I just replace the current value in index.tpl, which is http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
or would that cause all kinds of other problems? Do I have to change anything else in index.tpl, which currently looks like this:

{if $is_embedded != true}
{if $is_xhtml}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
{else}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
{/if}
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Validate

Post by yellowled »

Josh wrote:Can I just replace the current value in index.tpl, which is http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
or would that cause all kinds of other problems? Do I have to change anything else in index.tpl, which currently looks like this:
Actually, the relevant part is right below the one you quoted :)

The part you quoted is the doctype declaration, and it's fine the way it is now. Your index.tpl probably has something like:

Code: Select all

<html>
<head>
[...]
below that. Editing it to look like this:

Code: Select all

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
[...]
should do the trick.

YL
Josh
Regular
Posts: 110
Joined: Mon Jul 18, 2005 3:02 pm
Location: Berlin
Contact:

Post by Josh »

Thank you! It worked!

I appreciate your help!
Post Reply