HTML Head Section Element Tutorials in Hindi – Part 15

HTML Head Section Element Tutorials in Hindi - Part 15
HTML Head Section Element Tutorials in Hindi - Part 15

आज इस आर्टिकल में हम आपको HTML Head Section Element Tutorials in Hindi – Part 15 के बारे में बताने जा रहे है.

HTML Head Section Element Tutorials in Hindi - Part 15
HTML Head Section Element Tutorials in Hindi – Part 15

<head> tag एक container tag है जो की <html> element में और <body> tag से पहले रखा जाता है. इस container में ऐसा data रखा जाता है जो user को show ना हो सके मतलब इसका इस्तेमाल HTML document के डाटा को रखते है जिसको आप metadata के नाम से भी जानते है.

Metadata में title, character set, styles, links, scripts, और दूसरी meta information रखी जाती है. इसके लिए हम <title>, <style>, <meta>, <link>, <script>, और <base> जैसे element का इस्तेमाल करते है.

अब हम सबसे पहले <title> element के बारे में आपको बताएँगे.

HTML <title> Element

इसका इस्तेमाल किसी HTML document को title देने के लिए किया जाता है. इस title के कई काम है जैसे-

  1. यह User के browser पर show होता है.
  2. इसका इस्तेमाल user के page सेव करने या favorites में add करने पर उस page के title को provide करवाता है.
  3. यह title search engine में रिजल्ट के तौर पर show होता है ताकि user इस डॉक्यूमेंट के सार जान सके.

<title> element का इस्तेमाल हम head element के अन्दर करते है.

Example

<head>
<title>Page Title- RJ Beat</title>
</head>

HTML <style> Element

head element में हम <style> element का इस्तेमाल करके किसी भी page की CSS सेट कर सकते है. जैसे तो यह element कहीं पर भी इस्तेमाल किया जा सकता है लेकिन coding standard के हिसाब से इसको <head> element के अन्दर ही रखना चाहिए.

Example

<head>
 <style>
       body {background-color: powderblue;}
       h1 {color: red;}
       p {color: blue;}
 </style>
</head>

इस प्रकार हम किसी भी HTML document का designing डाटा एक html document में रख सकते है.
इसको internal CSS भी कहा जाता है. इसी प्रकार अगर हम किसी external CSS फाइल
को attach करने के लिए <link rel="stylesheet" href="customstyle.css"> का
इस्तेमाल करते है. इसकी डिटेल में जानकारी हम आपको CSS के tutorials में देंगे.

HTML <meta> Element

<meta> element का इस्तेमाल HTML डॉक्यूमेंट में इस्तेमाल हुए character set, page description, keywords, author का नाम और इसी तरह की meta जानकारी को specify करने के लिए किया जाता है.

metadata का इस्तेमाल browser करता है और HTML browser के द्वारा html document को किस प्रकार दर्शाना है यह सारी डिटेल metadata में ही दी जाती है.

Example

Meta Code Purpose
<meta charset="UTF-8"> character set को define करने के लिए
<meta name="description" content="Free HTML tutorials Hindi "> HTML page की description define करने के लिए
<meta name="keywords" content="HTML, CSS, XML, JavaScript, Tutorial, Hindi"> search engines में keywords define करने के लिए
<meta name="author" content="John Doe"> author define करने के लिए
<meta http-equiv="refresh" content="30"> हर 30 सेकंड में page को automatic refresh करने के लिए

HTML <base> Element

इस element का इस्तेमाल ज्यादा नही किया जाता है लेकिन आप इसका इस्तेमाल तब कर सकते है, जब आपको सभी फाइल्स एक ही URL से उठानी हो या सभी लिंक को आपको किसी अलग page पर open करना है तो आप base element में यह सब define कर सकते है ताकि आपको बार बार target attribute का इस्तेमाल ना करना पड़े.

<base href="https://hindialerts.com/" target="_blank">

HTML Entities & Symbols Tutorials in Hindi – Part 16>>>>>>>>

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *