HTML Formatting
In this page:
<b>Bold text</b>
<i>Italic text</i>
<mark>Highlighted text</mark>
<sub>Subscript</sub> <sup>Superscript</sup>
Bold बनाम Strong Text
b tag text को styling purposes के लिए physically bold बनाता है। strong tag भी text को bold करता है, लेकिन इसमें गहरा semantic अर्थ होता है। यह search engines और screen-reader software को संकेत देता है कि अंदर का text critical importance रखता है।
उदाहरण: Bold vs. Strong Text
<p><b>Bold for style</b> and <strong>strong for importance</strong>.</p>
Italics बनाम Emphasized Text
bolding की तरह ही, slanted text के लिए एक visual और structural pair होता है। i tag सिर्फ styling के लिए text को slant करता है, जबकि em tag verbal emphasis जोड़ता है। एक screen reader em text को थोड़ी अधिक voice stress के साथ पढ़ेगा।
उदाहरण: Italics vs. Emphasized Text
<p><i>Italic for style</i> and <em>emphasized for meaning</em>.</p>
Text को Mark और Highlight करना
mark tag text को default रूप से चमकीले पीले background के साथ highlight करता है, जो बिल्कुल किसी physical marker highlight जैसा दिखता है। यह आपके pages पर matching search results को इंगित करने के लिए बेहद उपयोगी है।
उदाहरण: Marking and Highlighting Text
<p>Search results for <mark>HTML</mark> tutorials.</p>
Subscript और Superscript
Subscript (sub) text को थोड़ा नीचे धकेलता है और उसे छोटा बनाता है, जबकि Superscript (sup) text को ऊपर धकेलता है। ये dates, mathematical squares, और chemical equations को format करने के लिए ज़रूरी elements हैं।
उदाहरण: Subscript and Superscript
<p>H<sub>2</sub>O and 10<sup>th</sup> place.</p>
Inserted और Deleted Elements
del tag दर्शाता है कि document से text हटाया गया है, जो आमतौर पर एक strike-through line के साथ render होता है। ins tag नए जोड़े गए content को दर्शाता है, जो default रूप से underline के साथ display होता है।
- बेहद professional changelogs और document revision histories बनाने के लिए del और ins को साथ में उपयोग करें।
- Accepted attributes:
- cite — बदलाव समझाने वाला URL
- datetime — बदलाव की valid date/time string, जैसे 2026-01-15 या 2026-01-15T10:30
- यह ins और del दोनों पर लागू होता है
उदाहरण: Inserted and Deleted Elements
<p><del>Old price: $50</del> <ins>New price: $40</ins></p>
small Element
small element side comments और छोटे प्रिंट को दर्शाता है, जैसे copyright notices, legal disclaimers, या licensing terms, और ब्राउज़र default रूप से इसे visually छोटे font में render करते हैं। इसमें सिर्फ visual styling से परे semantic अर्थ भी होता है।
उदाहरण: The small Element
<p>Product details here.</p>
<small>© 2024 Example Company. All rights reserved.</small>
Chapter Quiz — Complete all 11 topics to unlock
0/11 topics done
Complete these topics first: