Its mostly invisible to humans but how can you make sure your HTML isn't letting down your SEO? HTML is the code which provides the basic building blocks which tell a browser like Firefox or Chrome how to start putting a website page together. So how do you make sure it is search engine optimized?
Now if you have never come across HTML and you're thinking this is something for the experts - think again. In fact making sure your HTML is in order is something even a beginner should be doing and you don't need to know HTML code to do it. You may not be able to fix issues but if you know what they are its much easier to get the right help without being taken for a ride.
HTML helps search engines understand your content better and promote it more effectively when you use it right. It'll tell the search engines your content title, preferred summary and all the headings and subheadings just for starters. Mess it up and you won't do yourself any favors when it comes to better rankings.
So before we get started if you have never seen the HTML of your website before here is how to take a peak. Right hand click on an empty part of one of your pages and then, from the small menu that pops up left hand click on 'View Source' or 'View Page Source' or something like that. The exact working varies from browser to browser.
Don't get freaked out by the wall of code that you see, You can easily search out what you are looking for by pressing Ctrl and F at the same time. This will open a small search box bottom left or top right.
It doesn't matter how careful you try to be, mistakes happen. Your forget the closing </p> or </div>. Odd ball stuff that doesn't seem to have any effect on the page itself when you view it in a browser.
So run the code through the W3C HTML Validator to find and fix that sort of stuff. Remember though it won't tell you if you have missed anything, just if you have got something wrong.
Also be aware that it will flag up bugs that are beyond your control, like in bits of code for a Facebook Like button which are actually coming directly from Facebook. Let those go, nothing you can do about them.
How fast your pages load has become a key factor in where you rank because many users may be on mobile devices with slow Internet connections. When calculating its rankings Google only considers these people in what it calls Mobile First Indexing.
However as a general rule before I do too much I check if my page loading speed is actually an issue. You can do this via the Performance audit using the Google Lighthouse Project.
It will actually tell you which parts of your page are causing issues so if a javascript file is adding 0.1 of a second to your page loading time its probably not worth doing anything about that.
If my page load speed is close to 100% I might do some of the obvious stuff (such as delaying javascript file loading) but I probably wouldn't go spending hours stripping out excess code or fiddling around with delayed .css file loading or putting my above the fold css in the header.
To explain what the hell I just said, there are two keys to making your website load faster via HTML:
Most .js (javascript) files can be moved to the bottom of the code just before the closing </body> tag. Yes you can mark them 'async' so they load at the same time but better if they are loaded after the main content has rendered.
There is one .js file you'll need to keep in the header though and that's the one that handles delaying the load of the .css (Style sheets) files. There's a good tutorial about delaying .css file loading here on this.
If you do delay your css loading you'll have to compensate because for human users they are going to see your raw site and then it will jump to being your website with all the styling applied. Not good.
In this case all the above the fold styling (everything that applies to the visible part of the page as it loads) should be placed in the </body> area. On this site I do that for things like the navigation menu styling so you just need to view the source of this page to check how its done.
JSON-LD specifically tells search engines what your page is about so you can be sure a search engine robot doesn't misunderstand your content. Don't get me wrong if your content is badly put together the robot will think it doesn't match the JSON-LD and start thinking that you are a scammer so good content goes hand in hand with JSON-LD.
That said JSON-LD is a must have so don't skip this! It also includes all sorts of other useful bits like telling search engines how this all connects to your social media accounts.
For numerous examples of JSON-LD head over to Steal Our JSON-LD. There are plugins out there for platforms like WordPress but make sure you test these with the Google Structured Data Testing Tool as not all of them are that reliable or well written.
Experienced website developer or someone who has never touched HTML. Anyone can carry out the basic checks which will identify HTML issues which code be affecting your SEO so no excuse for ducking out of this work!
Your looking to make sure all the most important tags like the title tag, meta description, headers and so on are in place and being used properly. Then run the page through the W3C validator which will flag up any mistakes for you.
Next, before you go diving off into page loading speed work check if you have a page loading speed issue with the Google Lighthouse Performance Audit and if delaying javascript and/or css file loading will make a big difference.
Whatever you do though include JSON-LD within your HTML code. Its such a big help to search engines. I've seen local businesses flip straight to the top of the rankings after they'ved added JSON-LD because suddenly Google understands what they do and where they are perfectly.