Discord Server Red Security Twitter Donation to Red Security Red Security Youtube Channel
Windscribe
Login or Register to Hide ads and Accessing all features on the forum
Thread Rating:
  • 4 Vote(s) - 4.25 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial HTML 2: What is DOCTYPE?
#1
Big Grin 
In The Name OF Allah
Al-Salam Alekum

[Image: doctype-html.png]



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>  
<html>
    <head>
      *
      *
      *
    </head>
    <body>
      *
      *
      *
    </body>
</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">
XHTML 1.0 Transitional
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...


Heart Love
Wa Salam Alekum
Rs
* Thankful to Allah *
Kurdy
Reply




Users browsing this thread: 1 Guest(s)