As a beginner, there are lots of chances that you will make mistake in writing HTML code. Unsufficient knowledge of code strtucture will cause the page behave differently in each browsers.
To prevent this you will have to follow the guidelines and standards set by the W3C (Wide Web Consortium) for HTML web pages.
The World Wide Web Consortium provide a simple online tool (https://validator.w3.org/) where you can check you webpage’s validation. There are three ways of validating the webpages which are as follows.
1. Validate by URI
2. Validate by File Upload
3. Validate by Direct Input
What mistakes we should avoid:
1. Alt Tags
Most of the times, lots of developers forget to write the alt in img tag, if we do not write this tag, web page does not validate and it also affects your SEO.
<img src="images/logo.png" />
<img src="images/logo.png" alt="Name" />
2. Element div not allowed as child of element span
We should always remember that we can not put element div inside the span elements, this always throws an error and it’s not a good practise.
We should avoid using type=”text/script” for calling jquery codes because HTML5 doesn’t need this.