Table of Contents
HTML Elements
दोस्तों आज हम इस Post में HTML के Elements के बारे जानेगे, HTML element tag को हम <> angle brackets में लिख सकते है| तो हम जानगे की Elements क्या होते है और Elements किसे कहते है|
HTML syntax में, खाश करके element को opening tag और closing tag के साथ लिखा जाता है, और इस opening tag और closing tag के बीच में हमारा content होती है। एक HTML tag, element के नाम से बना है, और उसे हम angle bracket में लिख सकते है। opening tag bracket के बाद closing tag में एक slash भी है, जो opening tag से अलग करने के लिए| for example के लिए, एक heading tag जिसे हम <h1> to <h6> element से दर्शाया गया है|
तो दोस्तों यहाँ पे हमने <h1> </h1> (heading) tag का उपयोग किया है | यहाँ पे Example की तरह देख सकते है की Element यानि की heading के दोनों tags Opening tag <h1> और Closing tag </h1> को हम एक Element बोल सकते है | ऐसी तरह अगर हम Opening tag <p> और Closing tag </p> एक Element कह सकते है|
Simple Word में बोले तो elements ke opening tag और closing tag को Element कह सकते है |
For element example
<h1>This is my First Heading</h1> <p>This is My first paragraph.</p>
HTML elements के कुछ element में content नहीं होते (जैसे की the <br>,<hr> element). इस तरह के elements को हम empty elements कह सकते है और Empty elements के end tag नहीं होते है|
HTML Nested Elements
HTML Nested Elements का मतलब होता है की एक Element के अंदर दूसरा Element का उपयोग करना तो इसे हम Nested HTML Elements कह सकते है|
<!DOCTYPE html> <html> <body> <h1> Heading tag </h1> <span> span tag </span> <p> paragraph. tag </p> </body> </html>
यहाँ पर ऊपर का HTML Code देख सकते है उसे Nested HTML elements कह सकते है|हमने <html> element में अंदर <body> element लिखा है और <body> element में बी हमने <h1>,<span>,<p> जैसे element को लिखा है तो इस तरह का HTML structure जो होता है इसे HTML nested element कह सकते है| <html> एक root element है | और <html> के Opening tag और </html> Closing tagके बीच में <body></body>लिखा है|
<body> <h1> Heading tag </h1> <span> span tag </span> <p> paragraph. tag </p> </body>
<body> Element ये document का body defind करता है|
<body> element के Opening tag और Closing tag के साथ लिख सकते है |
<body> Element के बीच में <h1><p> Elements है|
<h1> Heading tag </h1> <p> paragraph. tag </p>
<h1> Element ये heading defind करता है|
<h1> element के Opening tag और Closing tag के साथ लिख सकते है|
<p> Element में Text,Paragraph लिख सकते है|
<p> element के Opening tag और Closing tag के साथ लिख सकते है|