Forum Moderators: goodroi

Message Too Old, No Replies

Does this trailing slash mean anything?

<meta name="robots" content="noindex" />

         

bouncybunny

5:16 pm on Jun 11, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've noticed that some sites use the following in their pages,

<meta name="robots" content="noindex" />

as opposed to

<meta name="robots" content="noindex">

Does the / signify anything?

DamonHD

5:32 pm on Jun 11, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's the modern 'self-closing' tag style that works with XHTML (ie XML) as well as plain XML.

Means just the same as without the trailing slash in this case, ie for this tag type.

Be sure to leave a space before the trailing slash so that even very very old HTML browsers and parsers will just think it's a typo and ignore it, which has the right effect...

Rgds

Damon

jdMorgan

5:50 pm on Jun 11, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The closing slash is required if the DocType is declared as XML or XHTML but should not be used otherwise.

Jim

DamonHD

6:43 pm on Jun 11, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm starting to use this (along with <br /> and <p /> for example) even in plain HTML documents...

IE and FF and Safari and Opera recent-ish versions seem happy: am I tempting fate?

Rgds

Damon

jdMorgan

7:10 pm on Jun 11, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It simply won't validate. There's no reason for it in an HTML DocType document, so it's a wasted byte.

How important these are is up to you. :)

Jim

DamonHD

7:24 pm on Jun 11, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Validation! HTML! Oxymorons ahoy! B^>

jdMorgan

8:10 pm on Jun 11, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



On the other hand, if your html+xml files don't validate, many user-agents will refuse to even render them... Best get used to validating your files now. :)

Jim

DamonHD

8:54 pm on Jun 11, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My XHTML files validate beautifully, which is one reason I'm getting in the habit of erring on the XHTML side of things...

HTML gets ... ahem ... tested instead.

Some of my HTML goes back to '94 or thereabouts I think, so validation wasn't even a gleam in TBL's mind's eye I guess...

Rgds

Damon

bouncybunny

10:51 am on Jun 12, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is the doctype from some forum software I was evaluating that uses this to exclude bots from non-content and duplicate URL areas. Is it all good?

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

JohnRoy

5:52 pm on Jun 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



- Validation! HTML! Oxymorons ahoy!

When all the SE rules will fall into place, non-validated html pages won't rank...

DamonHD

7:10 pm on Jun 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Which would chuck out:

1) All pages written before the standards were settled and that will not get updated for whatever reason.

2) All pages containing third-party code (such as AdSense, notably) that won't validate.

Rejecting readable if-non-perfect pages would violate the 'be generous in what you accept' part of client/server etiquette, and would be bad for SEs and their users.

Rgds

Damon