Latest Update

MS OFFICE, ADV. EXCEL, TALLY WITH GST, PHOTOSHOP, COMPUTER HARDWARE, COMPUTER REPAIRING, LAPTOP REPAIRING, WEBSITE DESIGNING, SOFTWARE ENGINEERING, ROBOTICS, "50% Discount on This Month", Job & Business Support, M.9560460853, 9650597419

Saturday, September 29, 2018

3. DOCTYPE Declaration की पूरी जानकारी हिंदी में

Introduction to <!DOCTYPE> Declaration

Hello Friends!
मै विनय Concept Computer Center से.........  


The DOCTYPE (Document Type) declaration defines this document to be HTML5.




Doctype Declaration का उपयोग हम ये बताने के लिए करते है कि हमने HTML की कौन सी version में coding की है। जैसे HTML 4 में, XHTML में या HTML 5 में। सारे versions  में  अलग अलग प्रकार से doctype declarations किया जाता है यानि कि HTML4 में अलग प्रकार से XHTML में अलग प्रकार से और HTML5 में अलग प्रकार से। 

Doctype declaration syntax in HTML 4

<!DOCTYPE HTML PUBLIC "//W3C//DTDHTML4.01 Transitional//EN" 
"http://www.w3.org/TR/TR/html4/loose.dtd">

ये लिखने का मतलब है कि आपने सिर्फ HTML 4 version में coding किया है। 

Doctype declaration syntax in XHTML  <!DOCTYPE HTML PUBLIC "-//W3C //DTD HTML 4.01//EN"
"http://www.w3.org /TR /html4/strict.dtd">

ये लिखने का मतलब है कि आपने HTML 4 और XHTML  दोनों versions में coding किया है। 

Doctype declaration syntax in HTML 5 

<!Doctype html>

ये लिखने का मतलब है कि आपने coding तीनो versions में (HTML 4, XHTML, HTML 5) किया है। 

आप coding किसी भी version में करे लेकिन doctype declaration HTML 5 में ही करे क्योंकि ऐसा करने से आप HTML 4, XHTML और HTML 5 के सभी tags और features का लाभ उठा पाएंगे। 

Complete structure of HTML 4 with doctype declaration 

<!DOCTYPE html>
<html>
<head>
<title>
title contents here 
</title>
</head>
<body>
webpage contents  here
</body>   
</html>     

HTML में coding करने से पहले  <!DOCTYPE html>  ये जरुर type करे ताकि आप HTML के सारे versions का लाभ उठा सके। 

<!DOCTYPE html> coding करने से पहले क्यों type करते है?

Ans.  coding करने के बाद जब हम website को server पर upload करते है तो server हमारे HTML code को read करने से पहले देखता है कि आपने HTML के कौन से version में coding की है HTML 4 में , HTML5 में या XHTML में। तो जब भी हम HTMLकी coding करते है। सबसे पहले यह define करते है कि किस version में हम coding करने जा रहे है। 
<!DOCTYPE> declaration करने से ही web server को पता चलता है कि आपने coding किस version में किया है और उसके बाद website, internet पर show होता है।    

Thank you, Have a great day  
Enjoy Our  Software Engineering Notes in Hindi 
Student Helpline:9650597419

No comments:

Post a Comment