btc — 2011-02-07T08:35:32-05:00 — #1
Which one of these is better for search engine crawlers? Is it better to declare the language?
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
xhtmlcoder — 2011-02-07T08:58:00-05:00 — #2
I very much doubt the Engines will care too much but it depends upon what version of XHTML you are using and how you are serving it. Though in your case I'd probably choose the first.
Basically in Appendix C.7: Use both the lang and xml:lang attributes when specifying the language of an element. The value of the xml:lang attribute takes precedence.
EDIT: Yes, declaring the language is very good idea. I misread part of your post.
btc — 2011-02-07T09:40:34-05:00 — #3
Thank you very much, this information is very helpful!
system — 2011-02-07T12:25:56-05:00 — #4
The WCAG guidelines say to include them, so include them.
Same goes for the Content-Language meta. There's a reason EVERY single one of my websites starts out from this template.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
Don't forget to implement these later!
$pageTitle - $siteTitle
empty tags like SPAN and B below are image sandbags for
sliding doors or glider-levin replacement - do not remove!!!
Horizontal rules and .jumpto menus should be removed by
screen, projection and TV CSS.
HR are present for CSS off users.
.jumpTo menus include Title on accesskey elements for Opera
and Blazer accesskey menus.
title="Top of Page"
>Top of Page</a>
title="Bottom of Page"
>Bottom of Page</a>
title="Back to Home Page"
<div id="contentWrapper"><div id="content">
Page Content Here
<!-- #content, #contentWrapper --></div><hr /></div>
Sidebar content here
<!-- #sideBar --></div>
<div id="footer"><hr />
Footer Content Here
<!-- #footer --></div><hr />
second jumpto menu needs no accesskeys since they are
already assigned up top, and the only reason we used
titles up top was so that accesskeys menus (like in Opera)
display useful text instead of the URL.
>Top of Page</a>
>Bottom of Page</a>
<!-- #pageWrapper --></div>
btc — 2011-02-07T16:03:05-05:00 — #5
Thanks for the info, it is of much help!
While on the subject of meta tags, I have used this one, <meta name="distribution" content="global" />
Is it necessary or just extra coding?
xhtmlcoder — 2011-02-07T16:25:13-05:00 — #6
It is extra. Usually character encoding and language types are the main ones you are likely to want to use in most pages as in Jason's example.
system — 2011-02-07T16:34:45-05:00 — #7
It's been a long time since our </li><li> argument. I'm happy to find you're agreeing with me, finally.
If you can't remember, and I'm sure it's hard since it was so long ago, when we were young, oh, so young, let me point you to exactly there: http://www.sitepoint.com/forums/showthread.php?t=708177.
I wish you well,
system — 2011-02-07T16:42:01-05:00 — #8
That formatting is NOT to collapse the white-space, and in fact the whitespace due to the use of ANCHORS will expand between the elements. It is NOT done for the reason of that discussion and I still say that the formatting of the markup one way or the other should have ZERO impact on appearance -- because appearance has no business being in the HTML in the first place. If changing the formatting of the markup screws up the rendering, then there's something fatally flawed with the CSS.
Nowhere did I say I'd never format LI that way, I just said I'd never format LI that way for the sole purpose of eliminating white-space. I most certainly will add tons of extra carraige returns and tabs if it means I don't have to scroll sideways or look at the illegible MESS that wordwrap ends up. See why the dips who put their CSS on one giant endless line of mush annoy me no end alongside the people who waste their time (and everyone else's) on whitespace stripping.
system — 2011-02-07T16:43:31-05:00 — #9
Still, I caught you a bit there!
Because you were judging me for </li><li> and extrapolate from there. But I could say, like you do now, that that's my formatting decision, and my decision also helps in some other areas. You know, like with eating celery
And no, if "changing the formatting of the markup screws up the rendering" then there is something wrong with UA rendering. Which was the case in the first place. The "chaining" was for correcting a fault, it wasn't aimed at achieving a fraudulent presentational result.
system — 2011-02-07T16:50:16-05:00 — #10
With meta tags you have to ask "what uses it?"
I've never even HEARD of "distribution" as a named type, and as such I've never heard of anything that actually would make use of it. Sounds like more of the useless bloated garbage sites like metatags.info want people to add to their page for NO GOOD REASON.
Since there's not a single piece of software out there that makes the least bit of use of 90% of the trash they promote.
the two http-equiv= : content-type and content-language
the two name=: keywords and description
and MAYBE name="robots" for values that are NOT the default
Anything else? COMPLETE AND TOTAL WASTE OF TIME.
Well, unless someone screws up your site by filing an ODP without your permission... then the 'noodp' googlebot one might be useful.
But Author? Generator? Rating? Trash, don't even waste your time.