# Self-Closing HTML Tags Reference

Complete reference guide for HTML void elements (self-closing tags), SVG elements, and MathML elements

> Canonical page: https://elysiatools.com/en/tools/self-closing-html-tags

- **Category:** Development

- **Keywords:** html, self-closing, void, elements, tags, svg, mathml, html5, reference

## Overview

This reference tool provides a comprehensive guide to self-closing tags, including HTML void elements, SVG elements, and MathML elements, helping developers write clean and standards-compliant code.

## Inputs

- **Element Type** (select): Filter elements by type
- **Search Elements** (text): Filter elements by name or description
- **Include Code Examples** (checkbox): Include syntax examples for HTML elements (when applicable)
- **Output Format** (select): Choose the output format

## When to use

- When you need to verify if a specific HTML element requires a closing tag.
- When working with SVG or MathML and need to confirm the correct syntax for void elements.
- When debugging markup issues caused by improperly closed or unclosed tags.

## How it works

- Select the element category (HTML, SVG, or MathML) to filter the list.
- Use the search bar to find specific tags by name or description.
- Toggle the 'Include Code Examples' option to see proper syntax for each element.
- Choose your preferred output format to copy or export the reference data.

## Use cases

- Validating markup structure during front-end development to ensure compliance with HTML5 standards.
- Creating documentation or style guides for team members regarding proper tag usage.
- Quickly checking syntax requirements for complex SVG graphics embedded in web pages.

## Frequently asked questions

### What is a void element in HTML?

A void element is an element that cannot have any child nodes, such as text or other elements. They do not require a closing tag.

### Do I need to add a slash at the end of HTML void tags?

In HTML5, the trailing slash is optional for void elements. However, it is required in XHTML and recommended by some style guides for consistency.

### Are SVG elements always self-closing?

No, only specific SVG elements are self-closing. Others require an explicit closing tag to function correctly within the DOM.

### Can I export this reference list?

Yes, you can select JSON or Markdown as the output format to easily integrate the data into your own documentation or projects.

### Does this tool cover all HTML tags?

This tool focuses specifically on self-closing (void) elements, SVG elements, and MathML elements, rather than the entire HTML specification.

## Related tools

- [Data URI Generator](https://elysiatools.com/en/tools/data-uri-generator): Convert files into Data URIs (Base64 or percent-encoded) for inlining images, fonts, and assets directly into HTML, CSS, or Markdown
- [SVG Sprite Sheet Generator](https://elysiatools.com/en/tools/svg-sprite-generator): Merge up to 30 SVG icons into one sprite sheet (symbol or view mode) with viewBox normalization, dedup, optional currentColor stripping, sanitization, live preview and usage snippets.
- [HTML Tags Reference](https://elysiatools.com/en/tools/html-tags): Complete reference guide for all standard HTML5 tags with categories and descriptions
- [ASCII Table Reference](https://elysiatools.com/en/tools/ascii-table): Browse the complete ASCII character table (0–127) with decimal, hex, octal, binary, HTML entity, and control character names; filter by code or name
- [Accessibility Checker](https://elysiatools.com/en/tools/accessibility-checker): Detect common WCAG 2.1 accessibility issues in HTML, fetched pages, or design images and return fix-ready guidance
- [PDF Header/Footer Snippets](https://elysiatools.com/en/tools/pdf-header-footer-snippets): Convert HTML to PDF with reusable logo, title, and date snippets
- [Regex Railroad Diagram Visualizer](https://elysiatools.com/en/tools/regex-railroad-diagram-visualizer): Render a regular expression as an SVG railroad (syntax) diagram showing literals, groups, alternations, and repetition, with capture-group numbering and flag explanations
- [JSON Diff Visualizer](https://elysiatools.com/en/tools/json-diff-visualizer): Compare two JSON payloads and render a visual HTML diff with path-level additions, removals, changes, and statistics

## Samples

- [SVG Samples](https://elysiatools.com/en/samples/svg-samples): Scalable Vector Graphics (SVG) samples demonstrating various SVG features and techniques
- [D3.js Data Visualization Samples](https://elysiatools.com/en/samples/d3js-data-visualization): Comprehensive D3.js data visualization examples including charts, maps, animations, and interactive visualizations
- [SVG Viewer Samples](https://elysiatools.com/en/samples/svg-viewer-samples): Sample SVG vector graphics (scene, icon set, diagram) for the in-browser SVG Viewer
- [XML Viewer Samples](https://elysiatools.com/en/samples/xml-viewer-samples): Sample XML files (bookstore, RSS feed, SVG) for the in-browser XML Viewer
