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
-
Can Google read this code?
I'm working on some basic on-page SEO content for a website within my company and I need some guidance as far as 1. whether Google can read the small amount of existing text (not optimized) and if it isn't spiderable, then 2. what code should be there instead. Here is the site: https://www.le-velgear.com/store/catalog The text I'm referring to is toward the bottom of the page (isn't it always?) and says this: Designed for a Thriving Lifestyle The Le-Vel Gear store is an extension of the LV Life, the Thrive product line, and the world's largest health and wellness Movement, which you helped create. Living a life you deserve includes looking good while showing the world your pride in being a Thriver...Check out all the new and incredible gear and tools and take your Thriving lifestyle to the next level!!! When I "View Source," I cannot see the text, however, the text is highlight-able with my cursor and I can see it when I "Inspect Element" in a container that says Thanks in advance for any help!
On-Page Optimization | | lizzyr0 -
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 -
Redirect Code Needed.
Hi, Please help me redirect the following pages in htaccess. https://www.mydomain.com/FolderA/FolderB/number-of-pages.html to **https://www.mydomain.com/FolderA/FolderC/FolderB/number-of-pages.html ** I want to redirect atleast 50 pages like this. Please help Thanks
On-Page Optimization | | Kashif-Amin0 -
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 -
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 -
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 -
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 -
Has anyone ever attempted (successfully or not) to consciously reduce their amount of homepage links in order to improve their search engine rankings?
I work for a retail company that is highly segmented. We have a lot of categories to cover the types of merchandise we offer on our home page, and way more than the recommended # of links on our homepage because of it. Has anyone ever attempted (successfully or not) to consciously reduce their amount of links (and categories) in order to improve their search engine rankings? If so, can you walk through your process and your advice on whether or not reducing links on a site like mine is a good idea?
On-Page Optimization | | reallygoodstuff0