Checking if your html is valid or not?
There are certain standards to a html code as i mentioned before, in
the past posts. So to check if our html code valid or not we have to use
a website that take your code and compare it to the specification of
the version of the HTML. So in order to do that we need to use the help
from a special site. So the website that we use to validate html is
called W3C markup validation service (frequently known as W3C
validator). This special site operated by the world wide web consortium
(W3C) You can simple get the service of that validator by going to this
link http://validator.w3.org.
In this site there are 3 ways to validate the html code.
- Validate by url - To do this you just have to give the url of your site and it'll do the rest.
- Validate by file upload - You can upload the .html file to here and check validation.
- Validate by direct input - You can just upload your html code directly to here and check validation.
The first thing you should do is just go to your html document and select the entire html document by pressing CTRL + A or just highlight them all by using the mouse. then copy the code to your clip board. to d that just press CTRL + C or right click on the page and choose COPY. then after that navigate to the w3c validator and again navigate to the 3rd option Validate by direct input. after that paste your code in to the code area. to do that press CTRL + V or just simply right click on that area and then click on paste. after that click on the check button.
If your code is valid you'll get a green message that says THE DOCUMENT WAS SUCCESSFULLY CHECKED AS HTML5!
If this appear on the page that means your code validation is done. the html code is according to the standards. And you can see in the green message as HTML5. that's because I used here HTML5.
So in this video we saw about how to make your code validate. So that's all for now.
No comments