My question is simple and that is "is it compulsory to write <!DOCTYPE html>
on every html document or optional?".
I know that some very simple html documents show correct result without doctype declaration. But I want to know is there a situation where it is necessary to declare it.