Skip to content

Add dedicated classes for missing HTML tags #268

@razvbir

Description

@razvbir

I did a comparison between the implemented tags and the HTML tags listed at MDN.

The following lists don't include obsolete tags (e.g. <marquee>), or SVG and MathML elements (e.g. <math>, <svg>).

To find out which tags are implemented and which are not, I searched for the tag name in tests. The table uses three states:

  • ✅ — dedicated class with specialised methods
  • ✅ (by CustomTag) — no dedicated class, but CustomTag has explicit void-element knowledge for it (see VOID_ELEMENTS in CustomTag.php), so it renders correctly without needing to call ->void() manually
  • ❌ — no dedicated class; can still be produced via CustomTag but requires a manual ->void() or ->normal() call

Should any of the following tags have their own named class? There are a few I consider particularly useful to add: <head>, <main>, <details> + <summary>, <dialog>, <dl> + <dt> + <dd>, <progress>, and <figure> + <figcaption>.

This is intended as a tracking issue rather than a single PR.

HTML Tags

I'd gladly implement any (or all) of the missing tags from this list, ideally one small group at a time.

Tag Support?
<a>
<abbr>
<address>
<area> ✅ (by CustomTag)
<article>
<aside>
<audio>
<b>
<base> ✅ (by CustomTag)
<bdi>
<bdo>
<blockquote>
<body>
<br>
<button>
<canvas>
<caption>
<cite>
<code>
<col>
<colgroup>
<data>
<datalist>
<dd>
<del>
<details>
<dfn>
<dialog>
<div>
<dl>
<dt>
<em>
<embed> ✅ (by CustomTag)
<fieldset>
<figcaption>
<figure>
<footer>
<form>
<h1>-<h6>
<head>
<header>
<hgroup>
<hr>
<html>
<i>
<iframe>
<img>
<input>
<ins>
<kbd>
<label>
<legend>
<li>
<link>
<main>
<map>
<mark>
<menu>
<meta>
<meter>
<nav>
<noscript>
<object>
<ol>
<optgroup>
<option>
<output>
<p>
<picture>
<pre>
<progress>
<q>
<rp>
<rt>
<ruby>
<s>
<samp>
<script>
<search>
<section>
<select>
<slot>
<small>
<source>
<span>
<strong>
<style>
<sub>
<summary>
<sup>
<table>
<tbody>
<td>
<template>
<textarea>
<tfoot>
<th>
<thead>
<time>
<title>
<tr>
<track>
<u>
<ul>
<var>
<video>
<wbr> ✅ (by CustomTag)

Experimental tags

I don't think these are worth implementing yet.

Tag Support?
<fencedframe>
<geolocation>
<selectedcontent>

Deprecated tags

These should not be implemented. Listed here for completeness only.

Tag Support?
<acronym>
<big>
<center>
<dir>
<font>
<frame>
<frameset>
<marquee>
<nobr>
<noembed>
<noframes>
<param>
<plaintext>
<rb>
<rtc>
<strike>
<tt>
<xmp>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions