How to change an HTML 4 document to HTML 5?


I have a ready-made project, made in HTML 4.01, how can I change it so that it recognizes HTML 5 ?

I can just change this:

 < !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "" >


< !DOCTYPE html >

and will it work?


Exactly, this is the correct way. This form makes the code compatible with HTML 5 and earlier versions.

I just don't like the spaces in the opening and closing of the tag , but I really like it.

Scroll to Top