Website testing
| Validate HTML and CSS | |
| Status codes and links | |
| Speed and mobile view | |
| Automated tests | |
| Who owns a domain |
A short list of checks for any website, from the markup to automated tests. The general theory of testing is in Software testing.
Validate HTML and CSS
The W3C validator finds unclosed tags, wrong nesting and invalid attributes: validator.w3.org/nu. Give it a URL, upload a file or paste the code. A typical find is Element tbody not allowed as child of element table in this context. CSS has its own validator: jigsaw.w3.org/css-validator.
Status codes and links
Every page should answer 200, moved pages 301 to their new address, and nothing your site links to should answer 404. Check one URL with curl:
curl -sI https://www.example.com/ | head -1
What the codes mean: HTTP status codes. How to move pages without losing visitors: Redirects.
Speed and mobile view
PageSpeed Insights measures how fast a page loads on a phone and on a computer and lists what slows it down; large images are the usual cause, see WebP images. The developer tools of the browser (F12) show the page at phone sizes.
Automated tests
Tests that click through the site like a user: Selenium with Python. If the site has an API, test it directly: API testing.
Who owns a domain
The registrar, the dates and the status of a domain are public: lookup.icann.org, or whois example.com in a terminal. Why that matters before a move: Moving a website.
Article authors: Andrei Olegovich, Klavdiya Kondakova