HTML Tag Names

0.1.2 · active · verified Sat Apr 11

This library provides a static list of known HTML tag names, encompassing both historical and current tags as defined by the HTML living standard. It is a Python port of the popular npm package `html-tag-names`. The current version is 0.1.2, with releases typically occurring infrequently, primarily for data updates or minor maintenance.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to import the list of HTML tag names and perform basic operations like checking its length, viewing elements, and testing for the presence of specific tags.

from html_tag_names import html_tag_names

print(f"Total HTML tags: {len(html_tag_names)}")
print(f"First 5 tags: {html_tag_names[:5]}")

if 'div' in html_tag_names:
    print("'div' is a known HTML tag.")

# Example of checking for a deprecated tag (which are included)
if 'font' in html_tag_names:
    print("'font' is in the list, though it is a deprecated tag.")

view raw JSON →