Which doctype to use in an html document?

-4

I'm doing a course online and the first tag that appeared in the line of typing was this for html, I know it's already in version 5 and other types of tags have already appeared. I opened this question out of curiosity. Is it really necessary to use this <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> tag in opening the HTML language or can we just use <!DOCTYPE HTM> ?

    
asked by anonymous 03.04.2017 / 15:26

2 answers

0

In HTML5 you will only use <!DOCTYPE html> , there is no need for validation. That is, <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> is used because of the validation of the XML language that requires it in XHTML files.

    
07.04.2017 / 19:08
0

In HTML5 we use only <!DOCTYPE html> and it is necessary to inform browsers that that file is HTML.

    
14.07.2017 / 21:10