HTML

Validate your code

What does validate your code mean?
It means that your code is compared to W3C standards.
There are different languages with different rules of grammar. The doctype you use, is setting the language you are using.
It its important to validate your code, because it makes you a better programmer, but it can also.

So use it to be a better programmer with perfect code
If you have some errors in HTML and CSS will the code still be showed.
Use the validator to prevent errors!

Validate overview

Validate HTML

Validate CSS

Page speed

When you have made a site, and made it online can user find it on Google, Bing and so on. But what will happend if the user go to the site and it is slow?
The user will find another site. Therefore it is important to make it fast.

Google Pagespped

Google have made a site, so you can check your page speed.
On the site will you get a PSI (PageSpeed Insights) score between 0 - 100
Google considers a speed score of 90–100 as fast, 50–89 as average, and 0–49 as slow.
Pagespeed is important to to keep the users on you site, so they dont leav after a few seconds. It can also affect your organic search engine rankings. Page speed is one of the ranking factors that Google’s algorithm uses to determine the ranking of a website in the search results.

How to improve page speed

Commen results from Google Pagespeed

It can be hard to understand what to should do, when Google tells you that something is wrong. But here it is:

“Leverage Browser Caching”

A web browser needs to display a number of items for a user: logo, CSS, images, html, etc. Caching allows a browser to “remember” elements already loaded (i.e. logo, navigation, etc). This allows the page to load much faster. You can add that in the .htaccess file

“Remove Render-Blocking JavaScript”

JavaScript is stopping the page from loading, to prevent that move you JavaScript file in the bottom before <body>

“Optimize CSS Delivery”

You have to much CSS. Look at your code an minimize it. You can also minify or compress CSS scripts.

“Enable Compression”

CSS and HTML files can be big and make the site slow, but if you compress them, can you make the site faster.

“Optimize Images”

The images you have are to big. You need to compress them.

HTTPS

When you go on website do you look for a keychain?
Have you seen the difference in a URL? Some pages have HTTP and some has HTTPS
HTTPS stands for Hypertext transform protocol secure and it is the secure version of HTTP which is the primary protocol used to send data between a web browser and a website
You use HTTPS if you want to encrypt some information that will be send between a web browser and website.
It could be data that is sensitive as logging into a bank account, email service or health insurance provider.

SEO

robots.txt

A robots.txt file is a text file, that should be places in the root of your website. When a searchbot, like googlebot, are visiting your website, will it first look after a robots.tcxt file.
In the file will there be information about which site there should be on Google and which there should not.
If you have a site, and dont want the 'frontpage' to be on Google you can write a robots.txt and tell Google not to index you frontpage.

Disallow a folder

If you have a folder or file that google should not crawl, you can under disallow write the filename or foldername

User-agent: *
Disallow: /nogooglebot/
User-agent: *
Disallow: /PDF/
Example 1.10.1

Allow everything

If you have a website and wants Google to crawl everything, then under allow make a slash

User-agent: *
Allow: /
Example 1.10.2

Sitemap

Sitemaps is a collection of all the sites you have. Google use it to crawl your site, in a quick way, which brings your SEO ranking higher. In a sitemap should all your pages URL be, with a last modified field. The sitemap is made with XML. You can use a Sitemap Generator

Folder structure
Example 1.10.3

Structured data

Google search needs to understand the content of a page, but it is not every time they can find all the informations. Thats why you can use Schema Markup
But what is that?
Schema Markup is a code you place on your website to help search engines return the right information to the user.
The schema is important, because it will help your website to rank better and look better. You can use Technicalseo to help making a schema. Here is a guide to make a schema.