HTML <main> टैग डॉक्यूमेंट में मुख्य या महत्वपूर्ण कंटेंट निर्दिष्ट करता है। इसका उपयोग प्रति पेज केवल एक बार किया जा सकता है और इसे <article>, <aside>, <footer>, <header>, <nav> एलिमेंट के डिसेंडेंट के रूप में उपयोग नहीं किया जा सकता।
उदाहरण
HTML डॉक्यूमेंट में मुख्य कंटेंट डिस्प्ले करना सीखने के लिए निम्न कोड चलाएं:
<!DOCTYPE html> <html> <body> <main> <h1>Learning</h1> <p>Learn to gain experience and try to share your knowledge with others.</p> <article> <h3>Web Development Tutorials</h3> <p>Consist of CSS, HTML, and PHP tutorials for 2nd Semester exams.</p> </article> <article> <h3>Academic Tutorials</h3> <p>Consist of Computer Fundamental, Computer Network tutorials for 1st Semester exams.</p> </article> </main> </body> </html>