GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Help ----- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> (https://gfy.com/showthread.php?t=940283)

Les Grossman 11-25-2009 08:33 AM

Help ----- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

When I validate my site, it is saying the trailing "/" at the end is invalid and shouldn't be there. However, all I see is code with this.

Can some code experts chime in here, I'm a little confused.

"The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML. "

JamesK 11-25-2009 08:36 AM

You need to specify the doctype. Add this to the top of your page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Nookster 11-25-2009 08:37 AM

Maybe because it's missing a space before the trailing slash?
Code:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
And yea of course you need to specify a doctype. Trailing slash is only required with xhtml versions.

JamesK 11-25-2009 08:42 AM

GFY timed out. Anyway, replace the HTML tag with this too:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

More info here:

http://www.w3.org/QA/2002/04/valid-dtd-list.html

Les Grossman 11-25-2009 08:59 AM

Thanks guys, I'll give that a try.


All times are GMT -7. The time now is 06:27 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123