The order in which the webpage is placed for my webapp - does it matter if the sidebar is programmatically displayed before the main content?
Well that's the worst title I could ever come up with. But I'm not too sure how to express it!
What I mean is it is ineffective for the browser, search engine optimization or any other important factors if programmatically my float:right
ed sidebar appears in the markup before the main content of the div which is set tofloat:left
For the user, the main content is displayed on the left and the sidebar on the right. In the source code, it looks like this:
<div id="sidebar">This is where my sidebar goes </div>
<div id="content">This is where my content goes </div>
Will this affect SEO or other factors on my page?
source to share
Yes, post your content first.
WordPress has a nice discussion of content structure and SEO . You want to place the content as close to the beginning of the submitted HTML file as possible. Robots and screen programs will get what they want sooner, and my guess is that the browser will start rendering the content according to where it belongs in the served file. CSS makes things out of order more or less trivial, so why not give HTML content all the help it can get?
source to share
You really can't tell ... but I suppose this won't happen as bots like Google crawler follow links, not text ... but it can affect image SEO as they are indexed by "surrounding content" ".
However, this is really correct because people on "limited devices" (really old cell phones) and people using screen readers will see your content in the correct order.
source to share
Nowadays, search engines are smart enough to distinguish between navigation and main content. You can help by adding meaningful class names or identifiers. I've never seen any real impact on the order ranking of both sections.
Whatever you do: add a skip link for keyboard users to jump to another section. It must be visible on :focus
. And hide the navigation in the plot stylesheet. :)
source to share