Does Code Order Matter?
-
I read/was told that it was a good idea to order your HTML to show the most important content first. So, on many sites I had put my global navigation div, for instance, below my main content div. Does this still apply? And does wise use of HTML 5 mean this is no longer necessary (eg use of "nav" section tag to indicate this section is about navigation).
In the same vein, how does Google know that my sidebar nav is my sidebar nav (which your site seems to say is probably given less weight than top nav), and how does it know my topnav is my top nav? Maybe a daft question, but when someone asked me yesterday I realised I didn't know!
(Phew - at last I have asked a short question!).
-
Perhaps HTML5 tags are used as one of the signals in determining which piece of source code is what. Seeing how easily one could manipulate these tags, I don't think it'll be a strong signal though. Of course it can be a good guidance for future web developers to identify pieces of source code!
Google is able to read CSS files (for example to determine if a link is hidden), but I don't think it will parse these files and apply them to the webpage to determine the visual layout of it. I think it would require a great amount of processing power (and time) to actually render a webpage, rather than sort out the pieces based on the source code like I described in my answer above.
Glad I could help!
-
Thank you - and very happy to receive a longer answer than my question!
That certainly answers my basic question, and I really appreciate it.
What do you think about the more "semantic" tags of HTML5 - such as the "nav"? Surely it's a good idea to use them to help Google (and later web developers) on their way with understanding the structure of the content?
And, a related question, can and does Google read CSS files to determine structure too? It's not mentioned on the blog post you pointed me to (and thanks for pointing me to it - a very helpful article in all sorts of ways which I hadn't read.)
-
I got the same question during a presentation I was giving recently and have to admit I didn't knew the answer on the spot either. Some thinking and discussing with others has given me a pretty clear picture on this though, which I will now try to pass on to you.
I don't think code order matters that much anymore. A couple years ago, when Google was crawling only a portion of a large webpage (mostly due to hardware restrictions), you'd better make sure your valuable text or links were placed in the first part of your webpage, otherwise it wouldn't get crawled at all! With Google crawling large webpage in total (if I recall some quote from Matt Cutts correctly he stated that they now index webpages over several MBs in size, as long as they contain enough valuable information).
With Google advancing their detection of the 'visual location' where text and links are placed on a webpage (see #5 on http://www.seomoz.org/blog/10-illustrations-on-search-engines-valuation-of-links), source code ordering will most likely have dropped in value as well. Using CSS styling, we can now order our source code pretty much at will anyway, which has changed it from a valid signal to a 'SEO trick' (just like adding a suffix to the URL has, see http://www.finishjoomla.com/blog/5/does-adding-a-suffix-to-my-urls-affect-my-seo/).
By 'viewing' (and perhaps manually categorizing or using machine learning http://en.wikipedia.org/wiki/Machine_learning) webpages Google will notice patterns in webpage source code. For example: 'that div containing a large amount of links, usually placed in an ul-li, often containing links to 'home' and 'contact' will most likely be your menu. Just like 'that div containing more text than any other div, often starting with a H1 or H2 tag, containing the most images and ending with a call-to-action' link will most likely be your page content area. Thus, Google doesn't 'know' whether a certain part of your source code is your menu, your sidebar or your page content, it deducts it by looking at common patterns.
(lol, my answer is more than three times as long as your short question!)
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Should I Use A Code For Last Updated Blog Posts
Hi, I have a quick question about updating blog posts. When I add "Last Updated" to an updated post should this be in any particular type of code or simply just text, perhaps with the tag? Thanks An Advance
On-Page Optimization | | KNpaul0 -
Site is too slow? Seeing a new code.
Site is too slow. I am seeing this new code more than 1000 times in my home page- What should I do now? My site- http://a1stlucie.com/
On-Page Optimization | | Beachflower0 -
Having a terrible time ordering the CSS Styles and Scripts in my header
Hi Guys, I am having a terrible time trying to get the correct optimized (for speed, none blocking etc) order for loading my external css and JS. I follow the recommendations from Google Page Speed or Chrome Audit and it seems no matter where I move the CSS file too (top or bottom) it complains about more blocking and stopping rendering of the page. My URL is http://www.MyFairyTaleBooks.com if some smart person out there could help me figure out what I am doing wrong and the order in which my should be organized I'd appreciate it! Oh I'm not a developer but I can re-arrange text in a file! 😉 Thank you!
On-Page Optimization | | MyFairyTaleBooks
Dinesh0 -
Disappearing Rel=Canonical Code
Hi, I've been getting a lot of rel=canonical warnings from seomoz. I went into the original pages and pasted in plain text the following code: link rel="canonical" href="http://www.example.com/blog/my-awesome-blog-post"< (the > are reversed). After a few crawls I couldn't see any effect from posting the code. When I went and checked again, it didn't stay in the wysiwyg editor. It disappeared! We are using Drupal 6. Could someone tell me what code I should be pasting? Thanks!
On-Page Optimization | | OTSEO0 -
Html code for none .index
In the diagnostic I have several errors in Duplicate Page Content and Title. The thing is that the errors is on the same page but with "different" names. One is called http://siteX.com/ another is called http://www.siteX.com/ and the same third one is called
On-Page Optimization | | mato
http://www.siteX.com/index.html How do I go about changing all three sites, I have changed the /index.html one but dont know how to catch the other once. Is it possible, if it is I would like to know how?0 -
How much the Page Rank matters in SEO?
I have my own blog which is 6 Month old with Page Rank 1, and my fiends has a blog with page rank 2 which is 6 Months Old domain as my. I used to work hard on content and Link Building. Following every webmaster guideline spending 3 to 4 Hours on my blog, but my friends website is just crazy, 3 Website links to it with no PR, no Facebook, no twitter shares and nothing. I want to Know How my friend website has High PR than me, Does Page Rank Really matters in SEO or my friend is performing some black hat magic on his website. Best answer will be appreciated thanks
On-Page Optimization | | Ganesh340 -
Does it matter what text you wrap in an H1 tag?
Typically H1 tags are reserved for page headings, i.e. on a blog post the blog post title is very often the pages H1, or top-level heading as the W3C puts it. On the SEOmoz home page they currently have "SEO Software." as their H1 tag, which seems perfectly reasonable and to me fits the W3C criteria. However, what if the primary keyword for SEOmoz was "seo community" so they decided to wrap just those two words in the sentence that follows on their home page and maintain the existing style of the words "seo community" with CSS. (see attachment) Are there any arguments against doing that? Would Google be able to detect this? If so, would Google care? I do believe the overall importance of the H1 tag has lessened to a degree, however I still believe they are valuable to an extent and would love to hear anyone's thoughts. 7NZcD.png
On-Page Optimization | | TakeLessons1 -
Does it matter if a rel = "canonical" element is added to the beginning or the end of a URL?
I am curious to know if adding a rel = "canonical" tag to the end of a link element will affect its purpose?
On-Page Optimization | | Sharecare0