Optimizing your website’s coding structure is one important step of SEO, and one of the only SEO steps that you can take right on your website. As far as SEO goes, on-site code consists of H1 H2 and H3 tags, keyword placement, URL structure and file sizes.
Keywords are important to have on your site. They’re one of the biggest factors that the Google search engine uses to determine what to show in the search results. You will have a number of keywords on your entire site. Keyword placement is just as important as having them. If you’re not sure which keywords to use, read our post on how to select keywords here.
For each page, you should put your keyword:
- In title of the post or page. The first 3-5 words have the most weight, so preferably use it early in your title.
- In the URL (should be the same as the title)
- In your H1 and H2 tags.
Google looks for your titles and subtitles using H1 and H2 HTML tags. This way, it can better understand what the page is about and that it is a quality article. H1 tags should be around the title of the page, and should only be used once per page. H2 tags can be used on the rest of the subheadings, but for further subheadings, you can use H3 tags.
Using an online validator like the W3C Validator helps you pinpoint if there is any broken code on your site. Google determines whether you have broken code and ranks your website lower for a lot of errors.
Aside from making images smaller file sizes on your website, you should also add alt tags to your images. Alt tags are a short description for screen readers and search engines to use to help determine what your page is about. You should include a short but honest description of what the image is about, and using a keyword in your alt tags helps.