Избор на DOCTYPE

dakata__92

Super Moderator
Не съм писал кой знае колко много дизайни но вече чета навсякъде, че се използва <!DOCTYPE html>. По-добре ли е вече да се използва той вместо примерно:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Който впрочем си ползвах почти винаги преди?
 
Същината на въпроса ти е "HTML5 или XHTML".
В гугъл като гледам повечето неща са писани от преди стандартизирането на html5, но въпреки това си струва да погледнеш.

Now is we compare these both technologies HTML5 is compatible with all types of browsers but the maintenance of XHTML is easier as well as it is easy to teach and learn as to HTML5. In HTML5 elements name are case insensitive while elements names are case sensitive and lower-case in XHTML. HTML5 provides the users with an ease of integrating different media as compared to XHTML. HTML5 allows like its predecessor developers to for more lenient code much to developers disappointment as compared to XHTML which reinforces strict and proper coding practises. HTML5 works better on various devices such as mobile phones and tablets while XHTML is best for computer screens.

So what is the right tool for the job? There is no conclusive answer to the question of HTML5 being superior to XHTML. The advantages and benefits depend on how one uses both languages. For a web content having media elements that should display well on various devices HTML5 supersedes XHTML but if web content has to be seen only for computer screens XHTML is a better choice as it is already known to the developers
.
От тук: https://www.servage.net/blog/2013/05/07/looking-at-the-differences-between-html5-and-xhtml/
 

Back
Горе