homepage Welcome to WebmasterWorld Guest from 54.167.179.48
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Meta Tags - best practice
Digmen1

5+ Year Member



 
Msg#: 4524456 posted 8:06 am on Dec 3, 2012 (gmt 0)

Are there any accepted best practice rules for the order in which meta tags are shown in the header?

Eg Title
Meta Tag keywords
Meta Tag description
etc

 

swa66

WebmasterWorld Senior Member swa66 us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4524456 posted 9:13 am on Dec 3, 2012 (gmt 0)

The encoding one (if you have one) should be the first

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4524456 posted 9:47 am on Dec 3, 2012 (gmt 0)

I add the elements within head in this order:

-encoding
-language
-title
-meta description
-rel links, canonical etc.
-robots
-css links
-js links
-inline css (rare)
inline js (rare)


wot? no meta keywords?

No!

topr8

WebmasterWorld Senior Member topr8 us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4524456 posted 10:48 am on Dec 3, 2012 (gmt 0)

>> -inline css (rare)

what inline css would be in the header?

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4524456 posted 11:11 am on Dec 3, 2012 (gmt 0)

Errr, "inline" was the wrong word. What I meant was "lines of code rather than a link to a separate file".

I usually put all CSS and JS in external files. Occasionally, very occasionally, there will be a couple of lines of css or js in the head section for something specific to that one page.

Even rarer still will be to add css or js directly to elements in the body.

topr8

WebmasterWorld Senior Member topr8 us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4524456 posted 3:03 pm on Dec 3, 2012 (gmt 0)

ok, sorry, i suspected that's what you meant! - thought i might have been missing something though!

me too though, css is in extrenal sheets unless there is something that is so specifically for one page only and then i might code it into the header.

coopster

WebmasterWorld Administrator coopster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4524456 posted 1:52 pm on Dec 4, 2012 (gmt 0)

HTML5 specs can be a helpful resource too.
[whatwg.org...]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved