Discord Server Red Security Twitter Donation to Red Security Red Security Youtube Channel Red Security Tumblr Profile
Windscribe
Login or Register to Hide ads and Accessing all features on the forum
Thread Rating:
  • 8 Vote(s) - 3.5 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


Possibly Related Threads…
Thread Author Replies Views Last Post
  Tutorial HTML 1: What is HTML? Mr.Kurd 0 1,573 07-09-2018, 08:55 AM
Last Post: Mr.Kurd
Big Grin Tutorial Rolling text in HTML Mr.Kurd 0 598 07-06-2018, 08:29 PM
Last Post: Mr.Kurd
Heart Two helpful books for learning HTML, CSS and JS Mr.Kurd 2 1,031 11-01-2017, 08:54 PM
Last Post: Mr.Kurd
  Tutorial HTML Tutorial Website Miss4ulove 2 1,175 10-31-2017, 11:46 AM
Last Post: Ghost
Big Grin HTML Linking an image Mr.Kurd 0 704 09-22-2017, 08:18 PM
Last Post: Mr.Kurd
Question Tutorial HTML language Mr.Kurd 2 1,151 05-24-2017, 02:59 PM
Last Post: Mr.Kurd



Users browsing this thread: 1 Guest(s)