0

I have document which is in html5 format. How can I validate if document is in right html5 format? I am not looking to test if text is rendered properly. e.g. bold/italic/table proportion, etc. I want to verify it is in right html5 format. Are there any test cases with which I can say particular document is in html5 format. What are the things/conventions to check to sign off particular document as html5 document. Are there any validation tests I can cover to run say via selenium. Any pointers are appreciated.

e.g. this is part of html5 code. How can I confirm 1. this is part of html5 2. validate it follows html5 conventions

<table class="table" id="table1">
     <caption>
      <span class="table--title-label">Table 1</span>
      <span id="id1" class="title">Table Title</span>
     </caption>
     <colgroup>
     <col>
     </colgroup>
     <thead class="thead"> 
      <tr class="row" id="row_id"> 
      .....
      </td> 
      </tr> 
     </tbody>
    </table>

Here is another block

<li class="link "><strong><a href="test.html">List1</a></strong><br><br>... </li>
user2661518
  • 2,677
  • 9
  • 42
  • 79

1 Answers1

0

Use the W3C Validator here: https://validator.w3.org/

This program will check if your markup adheres to proper HTML standards. Make sure to set the document type in the 'options' dropdown.

KyleS
  • 401
  • 3
  • 16
  • thnx I'll check it out. Any idea what goes on in background. How can see the tests it's running. – user2661518 Jun 16 '17 at 13:48
  • I believe the W3C applies these standards: https://www.w3.org/TR/html5/. Its quite a read but for the most part, it detects syntax errors and invalid markup. – KyleS Jun 16 '17 at 13:59
  • @user2661518 - You can download the source of the W3C Nu HTML Checker from https://github.com/validator/validator/releases/tag/17.3.0 and see how it works for yourself; And a description of various ways to run the validator at https://validator.w3.org/nu/about.html – Alohci Jun 17 '17 at 01:13