Is the closing tag </ html> required when using HTML5? If it is obligatory, what will happen if I do not close it?

    4 answers 4

    This tag is used once per page. It is because of him to raise the discussion. Better to put. A lot of space does not take.

      Yes.

      If it is obligatory, what will happen if I do not close it?

      Most browsers will close it for you.

      • Well, if we take into account that all modern browsers close </ html> themselves, then I can not close it. Right? - SkaZzzz
      • @SkaZzzz Well, why pesat gramatna ?? Please piss with ashybkami, so in fact faster than a lot! - arg
      • It is easier to turn everything inside out than to clarify why this is necessary? SHOWITAI'S PROGRAMS, PESA IS GASLY FASTER ... - SkaZzzz
      • 2
        Breaking a stereotype ... In general, I understood the essence. And he made conclusions for himself. Thanks for answers. - SkaZzzz
      • 2
        > what is it for? pay attention to the last line in this answer: “ Most browsers will close it for you.” It is a large part, not all. And it would be nice if your site code was valid everywhere. In addition, most likely (here I could be wrong, but I can not be wrong), this behavior (automatic closing of the tag) is not included in the standard, and therefore tomorrow this “most browsers” may refuse such behavior, or some other will appear a browser that won't do it for you. - DreamChild

      In html 5, the html, body, head tags have become generally optional, as I recall. But this is considered good form, so it’s worth writing them all the same.

      If you do not close, most likely, the validator will curse at it, and if your code comes to watch another layout designer, it will spit on it. =)

      No need to r * vn-code =)

      • 2
        used validator.w3.org with </ html> and without </ html> equally valid. Or do you mean some other validator? - SkaZzzz

      As far as I know, any html file is also a valid xml document. And there the root element is required. That is a tag in which all the others are nested. As well as there all the tags should be closed. So if you want your html-page to be compatible with xml technologies, then use the html tag and be sure to close it. Yes, and search engines will be easier to work with such a page.