Tutorial HTML 2: What is DOCTYPE? - Printable Version +- Red Security (https://redsecurity.info/cc) +-- Forum: Programming (https://redsecurity.info/cc/forumdisplay.php?fid=5) +--- Forum: PHP ,HTML & ASP (https://redsecurity.info/cc/forumdisplay.php?fid=6) +--- Thread: Tutorial HTML 2: What is DOCTYPE? (/showthread.php?tid=722) |
HTML 2: What is DOCTYPE? - Mr.Kurd - 12-27-2018 In The Name OF Allah Al-Salam Alekum Hello guys, today I'm going to discuss DOCTYPE's in HTML with you. IF you had any question please feel free asking here. Well DOCTYPE is written in the very first line of your source code before html tag. Basically DOCTYPE will give instructions to the browser which version of HTML or XHTML is this. Every version have it's own DOCTYPE. Quote:All HTML need to have a DOCTYPE declared. The DOCTYPE is not actually an element or HTML tag. It lets the browser know how the document should be interpreted, by indicating what version or standard of HTML (or other markup language) is being used. This is HTML 5 sample: Code: <!DOCTYPE html> We have one type of DOCTYPE in HTML5 while in HTML4 and XHTML1 we are having three types. I'll put them here and you may want to check them out.. HTML 4.01 Strict Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> HTML 4.01 Transitional Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> HTML 4.01 Frameset Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> XHTML 1.0 Strict Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> XHTML 1.0 Frameset Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> IF you had any question please feel free asking here... Wa Salam Alekum |