HTML - Doctype in Hindi




दोस्तों इस chapter में हम Doctype के बारे में जानेंगे तो चलिए शुरू करते है, Doctype का उपयोग browser को ये बताने के लिए किया जाता है की हमारा document कौन से version का HTML उपयोग कर रहा है. Doctype को हम HTML tag से पहले use करते है लेकिन HTML में यह optional होता है, यह एक HTML element नहीं है।

Doctype declaration एक HTML tag नहीं है, यह web browser के लिए एक Instructions है जिस को HTML के Page में लिखा जाता है. दोस्तों एक DOCTYPE declaration हमारे HTML document में उपयोग की गई HTML version की Information interpreter को provide करता है।

बहुत सारे web browsers old HTML versions को support नहीं करते है, इसलिए जब भी आप किसी HTML document को create करते है तो उसमे DOCTYPE declaration interpreter को यह बताने का काम करता है की आप HTML का कौन सा version उपयोग कर रहे हो।

<! DOCTYPE> tag के लिए syntax HTML या XHTML के edition के बीच भिन्न होता है, जो आप उपयोग कर रहे हैं, जब भी आप किसी HTML document में <!DOCTYPE> को declare करते हो तब HTML document की सबसे first line में इसको लिखना चाहिए. आइए अब हम इसका एक सबसे आम उदाहरण देखते हैं।

Example

<!DOCTYPE html>
<html>
<head>
<title>This Title About My paragraph</title>
</head>
<body>
This is my first best paragraph.
</body>
</html>

Result

This Title About My paragraph This is my first best paragraph.