: Inline CSS on Header Tag Does putting inline CSS on a heading element such as <h1> and <h2> affect SEO? If so, how?
Does putting inline CSS on a heading element such as <h1> and <h2> affect SEO? If so, how?
More posts by @Tiffany637
4 Comments
Sorted by latest first Latest Oldest Best
Does putting inline CSS on a heading element such as and affect SEO?
No, but it might slow down the page a notch since you're expecting the web browser to apply a style on-the-fly.
If your clients support javascript, consider styling the tag with it so that most of the page loads very quickly and the style comes on after the bare bones of the page have loaded. For example:
<html>
<head>
</head>
<body>
Main content
<script>
document.getElementsByTagName('H1')[0].style.fontSize="200%";
</script>
</body>
</html>
It may add a few hundred more bytes to the HTML but at least all the text-based content will load before any styling is applied to it. This means users can see text sooner.
Recent SEO tests show that Google doesn't pay much attention to tags anymore. Using <h1> tags is not really important at all anymore.
Google does give more weight to text that is large bold, above the fold, and centered. IE, text that looks like a heading. Styling your h1 tags such that they don't look like headings is going to be counterproductive. Google is going to treat the text inside an h1 that is styled to look less prominent as if it were not in a heading tag at all.
Conversely, styling a <span> or <div> to look like a heading (big, bold, and prominent) will give the text in it more SEO weight. It doesn't matter if that styling is inline, or done through a linked CSS file.
The main thing is that you should use separate css file for styles that improve your site's load time. On top of that, you can hide your .css from the SE bots whereas any evil inline css you use will be plainly visible to all the bots.
But if you're using nicely, there really is not a big effect on SEO or ranking.
What counts for a search engine is textual content, it will filter out everything else.
In-line CSS will contribute to the payload of the page and that affects the load speed.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.