HTML इंटरव्यू प्रश्न और उत्तर (HTML Interview Questions and Answers)

HTML इंटरव्यू प्रश्न और उत्तर (HTML Interview Questions and Answers)

HTML (HyperText Markup Language) एक वेब पेज की संरचना को परिभाषित करता है। यह वेब विकास के क्षेत्र में सबसे बुनियादी और आवश्यक भाषा है। अगर आप एक वेब डेवलपर के रूप में अपना करियर बनाना चाहते हैं, तो HTML से जुड़े इंटरव्यू प्रश्नों का उत्तर देना आपके लिए महत्वपूर्ण होगा। इस लेख में, हम कुछ सामान्य HTML इंटरव्यू प्रश्नों को देखेंगे और उनके उत्तर देंगे, ताकि आप इंटरव्यू में उत्कृष्ट प्रदर्शन कर सकें।

1. HTML क्या है? (What is HTML?)

हिंदी में: HTML (HyperText Markup Language) वेब पेजों की संरचना को परिभाषित करने वाली एक मार्कअप भाषा है। यह टेक्स्ट, इमेज, वीडियो, और अन्य मीडिया को एक वेब पेज में शामिल करने के लिए टैग्स का उपयोग करता है।

English: HTML (HyperText Markup Language) is a markup language that defines the structure of web pages. It uses tags to include text, images, videos, and other media in a web page.

2. HTML और XHTML में क्या अंतर है? (Difference between HTML and XHTML)

हिंदी में:
XHTML, HTML का एक अधिक कठोर और सख्त संस्करण है। XHTML में, सभी टैग्स को ठीक से बंद किया जाना चाहिए और सही केस में लिखा जाना चाहिए। HTML में यह अनिवार्य नहीं है।

In English:
XHTML is a more strict and precise version of HTML. In XHTML, all tags must be properly closed and written in the correct case, whereas in HTML, this is not mandatory.

3. विभिन्न मार्कअप भाषाएं कौन सी हैं? (What are the various markup languages available?)

हिंदी में:
कुछ लोकप्रिय मार्कअप भाषाएं हैं:

  • HTML
  • XHTML
  • XML
  • Markdown
  • SGML

In English:
Some popular markup languages include:

  • HTML
  • XHTML
  • XML
  • Markdown
  • SGML

4. HTML और HTML5 में क्या अंतर है? (What is the difference between HTML and HTML5?)

हिंदी में:
HTML5, HTML का नवीनतम संस्करण है और इसमें नए फीचर्स और एलीमेंट्स शामिल हैं जैसे कि <audio>, <video>, <canvas> और नई APIs जो HTML में नहीं थीं।

In English:
HTML5 is the latest version of HTML and includes new features and elements such as <audio>, <video>, <canvas>, and new APIs that were not available in HTML.

5. HTML का वर्तमान संस्करण क्या है? (What is the current version of HTML?)

हिंदी में:
HTML का वर्तमान संस्करण HTML5 है।

In English:
The current version of HTML is HTML5.

6. !DOCTYPE क्या है? (What is !DOCTYPE?)

हिंदी में:
!DOCTYPE एक घोषणा है जो ब्राउज़र को बताती है कि कौन सा HTML संस्करण उपयोग किया जा रहा है। HTML5 में, यह बस <!DOCTYPE html> है।

In English:
!DOCTYPE is a declaration that informs the browser about the version of HTML being used. In HTML5, it is simply <!DOCTYPE html>.

7. एलिमेंट्स और टैग्स क्या हैं, और इनमें क्या अंतर है? (What are elements and tags, and what are the differences between them?)

हिंदी में:
टैग्स वे निशान होते हैं जो HTML दस्तावेज़ में कंटेंट को परिभाषित करते हैं।
एलिमेंट्स टैग्स से बने होते हैं और वेब पेज पर दिखाई देने वाले कंटेंट को परिभाषित करते हैं।

उदाहरण: <p> एक टैग है, और <p>यह एक पैराग्राफ है</p> एक एलिमेंट है।

In English:
Tags are markers that define content within an HTML document.
Elements are made up of tags and define the content that appears on a web page.

Example: <p> is a tag, and <p>This is a paragraph</p> is an element.

8. विभिन्न हेडिंग टैग्स क्या हैं और उनका महत्व क्या है? (What are the various heading tags and their importance?)

हिंदी में:
HTML में हेडिंग टैग्स <h1> से <h6> तक होते हैं, जहां <h1> सबसे महत्वपूर्ण और सबसे बड़ा होता है और <h6> सबसे कम महत्वपूर्ण और सबसे छोटा होता है। ये टैग्स सर्च इंजन ऑप्टिमाइजेशन (SEO) के लिए महत्वपूर्ण होते हैं।

In English:
In HTML, heading tags range from <h1> to <h6>, where <h1> is the most important and largest, and <h6> is the least important and smallest. These tags are important for search engine optimization (SEO).

9. HTML का उपयोग करके पेज के किसी विशेष सेक्शन पर कैसे रीडायरेक्ट करते हैं? (How to redirect to a particular section of a page using HTML?)

हिंदी में:
आप किसी विशेष सेक्शन पर रीडायरेक्ट करने के लिए id एट्रिब्यूट और एंकर टैग का उपयोग कर सकते हैं। उदाहरण:

<a href="#section1">Go to Section 1</a>
<div id="section1">This is Section 1</div>

In English:
You can use the id attribute and anchor tag to redirect to a particular section. Example:

<a href="#section1">Go to Section 1</a>
<div id="section1">This is Section 1</div>

10. टैग्स और एट्रिब्यूट्स क्या हैं? (What are tags and attributes?)

हिंदी में:
टैग्स HTML के स्ट्रक्चर को परिभाषित करते हैं, जबकि एट्रिब्यूट्स टैग्स के अतिरिक्त गुणों को सेट करते हैं, जैसे कि id, class, src, आदि।

In English:
Tags define the structure of HTML, while attributes set additional properties for tags, such as id, class, src, etc.

11. क्या हम एक वेब पेज को दूसरे वेब पेज के अंदर दिखा सकते हैं? (Can we display a web page inside a web page or Is nesting of webpages possible?)

हिंदी में:
हाँ, हम iframe टैग का उपयोग करके एक वेब पेज को दूसरे वेब पेज के अंदर दिखा सकते हैं।

<iframe src="https://example.com"></iframe>

In English:
Yes, we can display a web page inside another web page using the iframe tag.

<iframe src="https://example.com"></iframe>

12. HTML में Void Elements क्या होते हैं? (What are void elements in HTML?)

हिंदी में:
Void elements वे तत्व होते हैं जो स्वयं-समाप्त होते हैं और उनके पास समापन टैग नहीं होता। उदाहरण: <br>, <img>, <input>

In English:
Void elements are self-closing elements that do not have a closing tag. Examples: <br>, <img>, <input>.

13. HTML Entities क्या हैं? (What are HTML Entities?)

हिंदी में:
HTML Entities वे विशेष कोड होते हैं जो वेब पेज पर विशेष कैरेक्टर को दर्शाने के लिए उपयोग किए जाते हैं। उदाहरण: &lt; < को दर्शाता है।

In English:
HTML Entities are special codes used to display special characters on a web page. Example: &lt; represents <.

14. HTML में विभिन्न प्रकार की सूचियाँ (Lists) कौन सी हैं? (What are different types of lists in HTML?)

हिंदी में:
HTML में तीन प्रकार की सूचियाँ होती हैं:

  • Ordered List (<ol>)
  • Unordered List (<ul>)
  • Description List (<dl>)

In English:
There are three types of lists in HTML:

  • Ordered List (<ol>)
  • Unordered List (<ul>)
  • Description List (<dl>)

15. HTML तत्वों के ‘id’ एट्रिब्यूट और ‘class’ एट्रिब्यूट में क्या अंतर है? (What is the difference between the ‘id’ attribute and the ‘class’ attribute of HTML elements?)

हिंदी में:
id एट्रिब्यूट एक तत्व को यूनिक रूप से पहचानने के लिए उपयोग होता है और एक पेज में एक बार ही उपयोग किया जाता है।
class एट्रिब्यूट कई तत्वों पर लागू हो सकता है और उन्हें समूहित करने के लिए उपयोग होता है।

In English:
The id attribute is used to uniquely identify an element and is used only once on a page.
The class attribute can be applied to multiple elements and is used to group them together.

16. मल्टीपार्ट फॉर्म डेटा क्या है? (Define multipart form data?)

हिंदी में:
मल्टीपार्ट फॉर्म डेटा एक प्रकार का एन्कोडिंग तरीका है जो HTML फॉर्म में फाइल्स अपलोड करने के लिए उपयोग किया जाता है। जब किसी फॉर्म में फाइल्स (जैसे कि इमेज, डॉक्यूमेंट्स) अपलोड करनी हो, तो enctype="multipart/form-data" का उपयोग किया जाता है।

In English:
Multipart form data is a type of encoding used when uploading files through an HTML form. When a form includes file uploads (such as images, documents), enctype="multipart/form-data" is used.

17. वेबसाइट की एसेट्स लोडिंग को कैसे ऑप्टिमाइज़ करें? (How to optimize website assets loading?)

हिंदी में:
वेबसाइट की एसेट्स लोडिंग को ऑप्टिमाइज़ करने के लिए:

  • मिनिफाई और कंप्रेस CSS, JavaScript, और इमेज फाइल्स।
  • Lazy Loading का उपयोग करके इमेजेज और वीडियो को धीरे-धीरे लोड करें।
  • Content Delivery Network (CDN) का उपयोग करें ताकि एसेट्स नजदीकी सर्वर से लोड हो।
  • कैशिंग का उपयोग करें ताकि बार-बार लोड होने वाले एसेट्स कैश से सीधे लोड हों।

In English:
To optimize website assets loading:

  • Minify and compress CSS, JavaScript, and image files.
  • Use Lazy Loading for images and videos to load them gradually.
  • Use a Content Delivery Network (CDN) to load assets from the nearest server.
  • Implement caching to load frequently accessed assets directly from the cache.

18. <strong>, <b> टैग्स और <em>, <i> टैग्स में क्या अंतर है? (What is the difference between <strong>, <b> tags and <em>, <i> tags?)

हिंदी में:

  • <strong> टैग का उपयोग टेक्स्ट को महत्व देने के लिए किया जाता है, जिससे वह महत्वपूर्ण दिखता है।
  • <b> टैग का उपयोग टेक्स्ट को बोल्ड बनाने के लिए किया जाता है, लेकिन इसका कोई अर्थपूर्ण महत्व नहीं होता।
  • <em> टैग का उपयोग टेक्स्ट को जोर देने के लिए किया जाता है, जिससे वह भावनात्मक रूप से महत्वपूर्ण दिखता है।
  • <i> टैग का उपयोग टेक्स्ट को इटैलिक बनाने के लिए किया जाता है, लेकिन इसका कोई अर्थपूर्ण महत्व नहीं होता।

In English:

  • The <strong> tag is used to emphasize text with importance, making it appear bold with semantic meaning.
  • The <b> tag is used to make text bold, but it does not carry any semantic importance.
  • The <em> tag is used to emphasize text with emotional importance, making it italic with semantic meaning.
  • The <i> tag is used to make text italic, but it does not carry any semantic importance.

19. HTML में <head> और <body> टैग्स का महत्व क्या है? (What is the significance of <head> and <body> tag in HTML?)

हिंदी में:

  • <head> टैग HTML डॉक्यूमेंट का मेटाडेटा रखता है, जिसमें पेज का टाइटल, लिंक्ड CSS, स्क्रिप्ट्स, और मेटा टैग्स शामिल होते हैं। यह पेज के दृश्य कंटेंट में प्रदर्शित नहीं होता।
  • <body> टैग HTML डॉक्यूमेंट के मुख्य कंटेंट को रखता है, जिसमें टेक्स्ट, इमेजेज, वीडियो, लिंक, और अन्य मीडियास शामिल होते हैं, जो ब्राउज़र में प्रदर्शित होते हैं।

In English:

  • The <head> tag contains the metadata of the HTML document, including the page title, linked CSS, scripts, and meta tags. It is not displayed in the visual content of the page.
  • The <body> tag contains the main content of the HTML document, including text, images, videos, links, and other media that are displayed in the browser.

20. सेल पैडिंग और सेल स्पेसिंग में क्या अंतर है? (How is Cell Padding different from Cell Spacing?)

हिंदी में:

  • Cell Padding: यह सेल के भीतर कंटेंट और सेल की बॉर्डर के बीच की दूरी को परिभाषित करता है।
  • Cell Spacing: यह दो सेल्स के बीच की दूरी को परिभाषित करता है।

In English:

  • Cell Padding: Defines the space between the content inside the cell and the cell’s border.
  • Cell Spacing: Defines the space between two cells.


Table of Contents

Index