{"id":182,"date":"2008-07-23T19:37:34","date_gmt":"2008-07-24T00:37:34","guid":{"rendered":"http:\/\/cssnewbie.com\/?p=182"},"modified":"2008-07-23T19:37:34","modified_gmt":"2008-07-24T00:37:34","slug":"4-ways-css-can-improve-your-seo","status":"publish","type":"post","link":"https:\/\/cssdeck.com\/blog\/4-ways-css-can-improve-your-seo\/","title":{"rendered":"4 Ways CSS Can Improve Your SEO"},"content":{"rendered":"<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/cssdeck.com\/blog\/wp-content\/uploads\/2008\/07\/streamlined.jpg\" alt=\"\\&quot;All A Bored\\&quot; by bruceley. Used under a Creative Commons license.\" title=\"&quot;All A Bored&quot; by bruceley. Used under a Creative Commons license.\" width=\"400\" height=\"158\" class=\"alignnone size-full wp-image-183\" \/><\/p>\n<p>We all know the overt <a href=\"http:\/\/cssnewbie.com\/what-is-this-css-thing-anyway\/\">benefits of using CSS<\/a> by now \u2013 being able to centrally locate all of our presentation, the ability to replicate design changes instantly over an entire website, and so on. But not everyone is sold on such details. These days, a lot of people are more interested in SEO (Search Engine Optimization, or making your pages look good in search engines) than anything else. So what happens if you have a client or an employer whose mantra is more along the lines of, \u201cSEO at any cost, CSS be damned\u201d?<\/p>\n<p>Well, I have some good news for you! Using CSS (and its trusty sidekick, XHTML) is actually very beneficial to your SEO standings. Below, I\u2019ve outlined four different ways that using CSS can help you improve your search engine optimization. Some of them happen automatically, while others require you make decisions.<\/p>\n<h3>Streamlined XHTML<\/h3>\n<p>In the world of SEO, size and location matter. If your page is significantly long, the content towards the bottom of your page won&#8217;t rank as &#8220;important&#8221; as the stuff at the top. And here\u2019s the important part \u2013 the &#8220;length&#8221; of the page is determined not by the amount of content (text, etc), but by the quantity of code. If Google has to read through a few hundred lines of nested tables constituting your top navigation before it ever gets to your content, then you\u2019re running the risk of the search engines considering the real guts of your website insignificant.<\/p>\n<h3>Organized Code<\/h3>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/cssdeck.com\/blog\/wp-content\/uploads\/2008\/07\/organized.gif\" alt=\"\" title=\"simple table-based layout\" width=\"400\" height=\"289\" class=\"alignnone size-full wp-image-184\" \/><\/p>\n<p>Sure, your table-based design might look just fine and dandy on the screen, but when it comes to search engine optimization, it\u2019s what\u2019s underneath that really counts. Search engines don\u2019t scan your page visually&#8230; they piece together a \u201cpicture\u201d of your site based on the code. And you may discover that your table-based design doesn\u2019t \u201cread\u201d quite the way you expected. <\/p>\n<p>Take the image above, for example. A search engine would read this page just like any other table: from top left to bottom right. It would read everything in the header, everything in the navigation, and everything in the sidebar <em>before it gets to the content.<\/em> And if your navigation and sidebar are the same on every page, you\u2019re going to take a negative hit in search engines for having a lot of duplicate content up front.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/cssdeck.com\/blog\/wp-content\/uploads\/2008\/07\/organized-2.jpg\" title=\"&quot;My Kitchen Confession&quot; by chotda. Used under a Creative Commons license.\" alt=\"An Organized Kitchen\" width=\"400\" height=\"200\" class=\"alignnone size-full wp-image-185\" \/><\/p>\n<p>Luckily, when you\u2019re working with CSS, you can organize your code any which way you choose. You can make sure your valuable, keyword-rich content is right up near the top of your XHTML, and push your sidebar into a div down below your content area. Your CSS can put your sidebar anywhere you want or need visually&#8230; and it won\u2019t change Google\u2019s reading of your website one iota.<\/p>\n<h3>Headings Make a Difference<\/h3>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/cssdeck.com\/blog\/wp-content\/uploads\/2008\/07\/headings.jpg\" title=\"Image borrowed from Unit Interactive&#039;s &quot;Better Font Stacks&quot; PDF. http:\/\/unitinteractive.com\/blog\/2008\/06\/26\/better-css-font-stacks\/\" alt=\"Headings in various typefaces\" width=\"400\" height=\"150\" class=\"alignnone size-full wp-image-187\" \/><\/p>\n<p>As mentioned previously, when you\u2019re worried about SEO, you should be worried about your code. It\u2019s what\u2019s underneath that counts when it\u2019s a search engine browsing your page \u2013 the visuals matter not a whit. To that end, make sure you\u2019re using good, old-fashioned heading tags (&lt;h1&gt; &#8211; &lt;h6&gt;) for all of your documents headings instead of just styling paragraphs or some other element with *shudder* font tags, or even CSS.<\/p>\n<p>You don\u2019t like how the third-level heading looks just above your article? Well, Google thinks it looks delicious, so maybe you should reconsider. Just whip out your mad CSS skills and style that heading to look like&#8230; well, like whatever you want! Google doesn\u2019t mind if your headings are 30-points tall and fuchsia (even if your other readers do).<\/p>\n<h3>Choose Your Emphasis<\/h3>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/cssdeck.com\/blog\/wp-content\/uploads\/2008\/07\/emphasis.jpg\" title=\"&quot;Pepper&quot; by the.Firebottle. Used under a Creative Commons license.\" alt=\"Emphasized red peppers\" width=\"400\" height=\"223\" class=\"alignnone size-full wp-image-186\" \/><\/p>\n<p>Headings aren\u2019t the only things that affect your SEO. Search engines also pay attention to a few other tags when determining what the \u201cimportant\u201d words on a page are. For example, Google tends to treat words wrapped in &lt;strong&gt; and &lt;em&gt; tags as being more significant that their surrounding text. That\u2019s why you\u2019ll sometimes see pages with randomly bold-faced or italicized word strewn about \u2013 they\u2019re trying to boost their SEO by helping Google find the keywords they want to focus on.<\/p>\n<p>But who\u2019s to say that those keywords need to be visible to <em>everyone?<\/em> We could always use CSS to ensure that search engines like Google and Yahoo understand which words are important, without having to annoy our readers with our strong-em soup. If we just take some XHTML like this:<\/p>\n<pre lang=\"html4strict\" escaped=\"true\" line=\"1\">&lt;p&gt;This sentence contains several \n&lt;strong&gt;keywords&lt;\/strong&gt; of \n&lt;em&gt;significant importance&lt;\/em&gt;.<\/pre>\n<p>Append it with a new \u201cSEO\u201d CSS class:<\/p>\n<pre lang=\"html4strict\" escaped=\"true\" line=\"1\">&lt;p&gt;This sentence contains several \n&lt;strong class=&quot;seo&quot;&gt;keywords&lt;\/strong&gt; of \n&lt;em class=&quot;seo&quot;&gt;significant importance&lt;\/em&gt;.<\/pre>\n<p>And then write a simple CSS rule like this:<\/p>\n<pre lang=\"css\" escaped=\"true\" line=\"1\">em.seo, strong.seo {\n\tfont-weight: normal;\n\tfont-style: normal; }<\/pre>\n<p>This CSS will prevent your SEO-purposed strong and em tags from being bold-faced or italicized on the screen. However, search engines will still recognize the significance of those tags.<\/p>\n<p>CSS and SEO, living together in perfect harmony. Who says you can\u2019t have your cake and eat it too?<\/p>\n<div class=\"wp-socializer wpsr-share-icons \" data-lg-action=\"show\" data-sm-action=\"show\" data-sm-width=\"768\" ><h3>Share and Enjoy !<\/h3><div class=\"wpsr-si-inner\"><div class=\"wpsr-counter wpsrc-sz-32px\" style=\"color:#000\"><span class=\"scount\"><span data-wpsrs=\"\" data-wpsrs-svcs=\"facebook,twitter,linkedin,pinterest,print,pdf\">0<\/span><\/span><small class=\"stext\">Shares<\/small><\/div><div class=\"socializer sr-popup sr-32px sr-circle sr-opacity sr-pad sr-count-1 sr-count-1\"><span class=\"sr-facebook\"><a rel=\"nofollow\" href=\"https:\/\/www.facebook.com\/share.php?u=\" target=\"_blank\"  title=\"Share this on Facebook\"  style=\"color: #ffffff\" ><i class=\"fab fa-facebook-f\"><\/i><span class=\"ctext\"><span data-wpsrs=\"\" data-wpsrs-svcs=\"facebook\">0<\/span><\/span><\/a><\/span>\n<span class=\"sr-twitter\"><a rel=\"nofollow\" href=\"https:\/\/twitter.com\/intent\/tweet?text=%20-%20%20\" target=\"_blank\"  title=\"Tweet this !\"  style=\"color: #ffffff\" ><i class=\"fab fa-twitter\"><\/i><\/a><\/span>\n<span class=\"sr-linkedin\"><a rel=\"nofollow\" href=\"https:\/\/www.linkedin.com\/sharing\/share-offsite\/?url=\" target=\"_blank\"  title=\"Add this to LinkedIn\"  style=\"color: #ffffff\" ><i class=\"fab fa-linkedin-in\"><\/i><\/a><\/span>\n<span class=\"sr-pinterest\"><a rel=\"nofollow\" href=\"https:\/\/www.pinterest.com\/pin\/create\/button\/?url=&amp;media=&amp;description=\" target=\"_blank\"  title=\"Submit this to Pinterest\"  style=\"color: #ffffff\" data-pin-custom=\"true\"><i class=\"fab fa-pinterest\"><\/i><span class=\"ctext\"><span data-wpsrs=\"\" data-wpsrs-svcs=\"pinterest\">0<\/span><\/span><\/a><\/span>\n<span class=\"sr-print\"><a rel=\"nofollow\" href=\"https:\/\/www.printfriendly.com\/print?url=\" target=\"_blank\"  title=\"Print this article \"  style=\"color: #ffffff\" ><i class=\"fa fa-print\"><\/i><\/a><\/span>\n<span class=\"sr-pdf\"><a rel=\"nofollow\" href=\"https:\/\/www.printfriendly.com\/print?url=\" target=\"_blank\"  title=\"Convert to PDF\"  style=\"color: #ffffff\" ><i class=\"fa fa-file-pdf\"><\/i><\/a><\/span><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>We all know the overt benefits of using CSS. But these days, a lot of people are more interested in SEO than anything else. So what happens if you have a client or an employer whose mantra is more along the lines of, &#8220;SEO at any cost, CSS be damned&#8221;? [&#8230;]<\/p>\n<p><a class=\"more-link article\" href=\"https:\/\/cssdeck.com\/blog\/4-ways-css-can-improve-your-seo\/\" title=\"Click to read '4 Ways CSS Can Improve Your SEO'\">Read Article<\/a><\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[168],"tags":[79,255,279,345,351],"_links":{"self":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/posts\/182"}],"collection":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/comments?post=182"}],"version-history":[{"count":0,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/posts\/182\/revisions"}],"wp:attachment":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/media?parent=182"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/categories?post=182"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/tags?post=182"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}