TutorialsHTMLMiscellaneous Tags
Share:

Miscellaneous Tags

advanced

Part of HTML Forms & Media

Theory

Beyond the core elements, HTML offers a rich set of specialized tags for displaying symbols, defining abbreviations, marking up time, creating interactive disclosures, and more. These tags add precision, accessibility, and interactivity to your pages.

HTML Entities

HTML entities are special codes used to display reserved characters (like < and >) that would otherwise be interpreted as HTML code. They always start with & and end with ;.

| Entity | Result | Description | |--------|--------|-------------| | &lt; | < | Less than | | &gt; | > | Greater than | | &amp; | & | Ampersand | | &quot; | " | Double quote | | &apos; | ' | Apostrophe | | &nbsp; | (space) | Non-breaking space | | &copy; | © | Copyright | | &reg; | ® | Registered trademark | | &trade; | ™ | Trademark |

<p>Use &lt;h1&gt; to define the main heading.</p>
<p>Copyright &copy; 2026 CodeWithMishu. All rights reserved.</p>

HTML Symbols

HTML entities can display mathematical and currency symbols:

| Entity | Result | Entity | Result | |--------|--------|--------|--------| | &euro; | € | &pound; | £ | | &yen; | ¥ | &cent; | ¢ | | &dollar; | $ | &sum; | ∑ | | &prod; | ∏ | &radic; | √ | | &infin; | ∞ | &there4; | ∴ | | &deg; | ° | &plusmn; | ± |

Emojis in HTML

Emojis are characters from the Unicode character set. You can use them directly or with their hex code:

<p>I love coding! &#128640; &#128187; &#128153;</p>
<p>I love coding! 🚀 💻 💙</p>

Both lines display the same emojis. Using emojis directly in your HTML is simpler and more readable.

The <details> and <summary> Elements

These create an interactive disclosure widget that users can expand and collapse without JavaScript:

<details>
  <summary>Click to expand</summary>
  <p>This content is hidden until the user clicks the summary.</p>
</details>

The open attribute keeps the details visible by default: <details open>.

The <dialog> Element

The <dialog> element creates a modal or non-modal dialog box:

<dialog id="myDialog">
  <h2>Dialog Title</h2>
  <p>This is a native HTML dialog.</p>
  <button onclick="document.getElementById('myDialog').close()">Close</button>
</dialog>
<button onclick="document.getElementById('myDialog').showModal()">Open Dialog</button>

Use .showModal() for a modal (blocks interaction with the rest of the page) or .show() for a non-modal dialog.

Semantic Inline Tags

  • <abbr> — abbreviations with a title attribute for the full form: <abbr title="HyperText Markup Language">HTML</abbr>
  • <address> — contact information (renders in italics)
  • <cite> — title of a creative work (book, article, song)
  • <code> — inline code snippets: <code>console.log()</code>
  • <kbd> — keyboard input: <kbd>Ctrl</kbd> + <kbd>C</kbd>
  • <samp> — sample output from a program
  • <time> — dates and times, with datetime attribute for machine-readable format: <time datetime="2026-06-18">June 18, 2026</time>
  • <mark> — highlighted / marked text (yellow background by default)

The <bdo> Element

<bdo> overrides text direction. Useful for bi-directional text (Arabic, Hebrew):

<p><bdo dir="rtl">This text is right-to-left.</bdo></p>

The <noscript> Element

<noscript> shows content when JavaScript is disabled in the browser:

<noscript>
  <p>JavaScript is disabled. Please enable it for the best experience.</p>
</noscript>

The <meta> Refresh

You can redirect users after a delay (though server-side redirects are preferred for SEO):

<meta http-equiv="refresh" content="5; url=https://example.com">

This redirects to https://example.com after 5 seconds.

Use semantic inline tags like <abbr>, <cite>, and <time> to add meaning to your text. They improve accessibility and SEO.

Practical Examples

Example: Entities, Symbols, and Emojis
html
Example: Interactive Elements and Semantic Tags
html

Exercises

Create a Glossary with Semantic Tags

easy

Create an HTML glossary page for at least 5 web development terms. Use <abbr> for abbreviations, <dfn> for definitions, and <cite> for references. Also include at least three HTML entity examples in the text.

Build an FAQ Page with Details/Summary

medium

Create an FAQ page with at least 6 questions using the <details> and <summary> elements. Include at least one nested details element (a sub-question inside an answer). Add two <dialog> elements triggered by buttons.

Expected Output:

An FAQ page with 6 expandable questions. One question reveals another nested details element inside its answer. Two buttons open modal dialogs with additional information.

Mini Quiz

Mini Quiz

Mini Project

Mini Project: FAQ Page with Interactive Elements

Build a comprehensive FAQ page for a fictional product or service. Use details/summary for collapsible questions, dialog elements for modals, semantic inline tags for terminology, and HTML entities and symbols throughout.

Requirements:

    Bonus Challenge

    Add a 'filter' feature: use HTML data attributes and a small JavaScript function to filter questions by category when the user clicks category buttons.