Menu

Related Topics

HTML CSS JavaScript PHP Node.js React.js C C++ Go Rust Swift Python Java Excel MS Word PowerPoint
Search

HTML Syntax in Hindi

HTML Syntax क्या होता है? – HTML Syntax in Hindi

HTML Syntax का मतलब है HTML code को लिखने के सही rules और structure। जिस तरह किसी language को समझने के लिए उसके grammar के rules होते हैं, उसी तरह HTML में भी कुछ rules होते हैं जिनके अनुसार tags, elements, attributes और content को लिखा जाता है। Browser इन HTML rules को समझकर webpage का structure तैयार करता है।

HTML Syntax को समझना HTML सीखने के लिए बहुत जरूरी है, क्योंकि अगर tags को गलत तरीके से लिखा जाए या उनका structure सही न हो, तो webpage का expected output नहीं मिल सकता है।

HTML Tag क्या होता है?

HTML में webpage के अलग-अलग हिस्सों को define करने के लिए Tags का उपयोग किया जाता है। HTML tags सामान्यतः angle brackets (< >) के अंदर लिखे जाते हैं। उदाहरण के लिए paragraph के लिए <p> tag और heading के लिए <h1> tag का उपयोग किया जाता है।

एक सामान्य HTML tag का उदाहरण इस प्रकार है:

<p>

यह browser को बताता है कि यहां से एक paragraph element शुरू हो रहा है।

Opening Tag और Closing Tag

बहुत से HTML elements में दो tags होते हैं – Opening Tag और Closing Tag। Opening tag element की शुरुआत बताता है, जबकि closing tag उस element को समाप्त करता है। Closing tag में forward slash / का उपयोग किया जाता है।

उदाहरण:

<p>This is a paragraph.</p>

इस example में <p> opening tag है और </p> closing tag है। दोनों tags के बीच लिखा हुआ text उस paragraph का content है।

HTML Element क्या होता है?

HTML Element को केवल tag नहीं समझना चाहिए। एक complete element में opening tag, content और closing tag शामिल हो सकते हैं।

उदाहरण:

<p>Hello World</p>

इसमें <p> opening tag, Hello World content और </p> closing tag है। इन तीनों को मिलाकर पूरा paragraph element बनता है।

HTML Syntax Example

एक basic HTML document का syntax कुछ इस प्रकार दिखाई दे सकता है:

HTML
HTML Syntax Example का मतलब
<!DOCTYPE html>

<!DOCTYPE html> document type declaration है। यह browser को बताता है कि document को modern HTML standard के अनुसार interpret किया जाना चाहिए। HTML5 documents में सामान्यतः इसी declaration का उपयोग किया जाता है।

<html>

<html> root element है। पूरे HTML document का structure इसके अंदर लिखा जाता है। इसके अंदर मुख्य रूप से <head> और <body> sections होते हैं।

<head>

<head> section में ऐसी information रखी जाती है जो webpage की configuration और metadata से संबंधित होती है। इसमें <title>, meta tags, CSS files, favicon और अन्य resources के references शामिल किए जा सकते हैं। इसका अधिकांश content सीधे webpage के main visible area में दिखाई नहीं देता।

<title>

<title> tag webpage का title define करता है। यह आमतौर पर browser tab में दिखाई देता है और search engines के लिए भी page title के रूप में महत्वपूर्ण होता है।

<body>

<body> के अंदर webpage का मुख्य content लिखा जाता है। जैसे headings, paragraphs, images, links, lists, tables, forms और अन्य visible elements।

<h1>

<h1> heading element है। इसका उपयोग page की मुख्य heading के लिए किया जाता है। एक webpage में इसके उपयोग को page structure के अनुसार व्यवस्थित रखना चाहिए।

<p>

<p> tag paragraph बनाने के लिए उपयोग किया जाता है। इसमें सामान्य text या किसी topic की जानकारी लिखी जा सकती है।

<a>

<a> anchor element है। इसका उपयोग hyperlinks बनाने के लिए किया जाता है। इसके साथ href attribute का उपयोग करके destination URL दिया जाता है।

HTML में Nesting क्या होती है?

जब एक HTML element के अंदर दूसरा HTML element लिखा जाता है, तो इसे Nesting कहा जाता है। HTML document में elements को सही तरीके से nest करना जरूरी है।

उदाहरण:

<p>This is <strong>important</strong> text.</p>

यहां <strong> element, <p> element के अंदर मौजूद है। इसलिए यह एक nested element का example है।

Empty या Void Elements क्या होते हैं?

HTML में कुछ elements ऐसे होते हैं जिनके लिए सामान्यतः closing tag की आवश्यकता नहीं होती। इन्हें Void Elements कहा जाता है।

उदाहरण:

उदाहरण:

<img src="photo.jpg" alt="My Photo">

यहां <img> element के लिए अलग से </img> closing tag नहीं लिखा जाता।

HTML Syntax लिखते समय ध्यान रखने वाली बातें
HTML Syntax क्यों महत्वपूर्ण है?

HTML Syntax web development की basic foundation है। HTML browser को यह समझने में मदद करता है कि webpage के अलग-अलग parts किस प्रकार structured हैं। सही syntax का उपयोग करने से document को maintain करना आसान होता है और HTML structure को browsers, developers तथा अन्य web technologies के लिए समझना आसान हो जाता है।

जब आप HTML Syntax को अच्छी तरह समझ लेते हैं, तो आगे चलकर CSS, JavaScript और Web Development की दूसरी technologies सीखना भी आसान हो जाता है, क्योंकि ये technologies HTML structure के साथ मिलकर webpages और web applications तैयार करती हैं।

संक्षेप में

HTML Syntax HTML code को सही तरीके से लिखने के rules और structure को कहा जाता है। इसमें tags, elements, attributes, nesting और document structure जैसे concepts शामिल होते हैं। Opening और closing tags, attributes और HTML document के basic structure को समझना किसी भी beginner के लिए बहुत जरूरी है।

एक बार HTML Syntax की basic understanding हो जाने के बाद आप headings, paragraphs, links, images, lists, tables और forms जैसे अलग-अलग HTML elements को आसानी से समझ और इस्तेमाल कर सकते हैं।


Code copied!

Page Views
0
Visit ID
Not tracked yet
Visit Time
-
Time on Page
0 seconds

Request


Leave a Comment


INITIALIZING...


INITIALIZING...


Quizzes in Hindi

GK Online Quiz in Hindi 10 pages
HTML Online Quiz in Hindi 10 pages
CSS Online Quiz in Hindi 10 pages
JavaScript Online Quiz in Hindi 10 pages
CCC Online Quiz in Hindi 10 pages
History Online Quiz in Hindi 10 pages



Comments Total: 0 comments

📰 Latest Articles

Total: 0 Articles

Featured Products

0 Products 0 Loaded 0 Remaining

All Products Loaded!

You've reached the end of our collection.

Contact Us Form