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
-
Does blogging with a wysiwyg negatively affect SEO (vs. hand coding)?
Many bloggers use a wysiwyg editor to write posts. Are there any drawbacks to wysiwyg vs plain text? When I write blogs I prefer to hand code my text to be sure everything is optimized. My feeling is that wysiwyg leads to code bloat and generally fewer optimization opportunities. I have no real evidence. Is there any reason not to use the wysiwyg editor?
On-Page Optimization | | Jason-Rogers0 -
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 -
With 301 Redirects Does Changing URLs Matter?
We are redesigning our website in order to give it a more modern visual look. For the most part all the content will remain the same. Our old site is hosted on .asp so all of our current URLs look something like this: www.example.com/products/food.asp We plan on using 301 redirects in order to update every URL and remove the .asp. Since we are going to be doing 301 redirects for every existing URL anyways, does it matter from an SEO and ranking standpoint, if we also change the content and structure of the URL? For example, would we see a ranking impact if we were to change the above example URL to www.example.com/food? Obviously we want to try to retain as much link juice and ranking factors as possible during this redesign. Another issue we are seeing is with the image file names of our existing website images. We are moving to a new CMS platform (WordPress) that automatically saves images using a folder path similar to this: wp-uploads/2015-08/food. Will that change affect our SEO or ranking at all? When Google crawls an image does it care about the full path? Any insight would be much appreciated! 🙂
On-Page Optimization | | BlueLinkERP0 -
Meta Title in Google does not match the HTML meta title I have coded in a site
I have a client site that is pulling a meta title that is not in his code. I am using Yoast for the titles and descriptions on this site. Not 100% sure why Google is not listing the title we have in place. Could the code be pulling from somewhere else? Is there a fix for this?
On-Page Optimization | | Bryan_Loconto0 -
Does Commented HTML Code Get Spidered?
I have a change, perhaps temporary, to my web store that I will be making. I am wondering if the code that I will comment out () gets spidered?
On-Page Optimization | | lbohen0 -
How long should I wait before making changes to my new site in order to increase ranking?
I just create a site www.autoinsurancefremontca.com. It has been about a week since this site has been launched. The site currently resides at 12th position on google. With Semoz it has a Site Grade Of "A" . When should I start making changes to the site like adding a content as an example to increase my ranking. I am trying to get this site on the first page with google. Please help!!
On-Page Optimization | | Greenpeak0 -
Does Too Many On-Page Links on a Page Really Matters?
Does Too Many On-Page Links on a Page Really Matters? Especially if they are pointing to internal page?
On-Page Optimization | | AppleCapitalGroup1 -
Does the keyword meta tag not matter anymore?
In the SeoMoz report generated, it recommended removing the meta keywords tag as it was no long relevant? why is google no longer considering this?
On-Page Optimization | | mancmusicman0