HTML <nextid> Tag

The <nextid> element was an early, tool-generated HTML tag for the NeXT web editor. It stored the next automatic identifier value used when that tool created anchor NAME labels.

Learn it only to recognize legacy markup. For new work, assign unique id values yourself, or generate GUIDs / UUIDs (WHATWG guidance: use GUIDs instead of nextid).

Obsolete / Non-conforming.

Do not use <nextid> in new HTML. It is listed as entirely obsolete in the HTML Standard and is not supported by modern browsers.

Modern replacement.

Put a unique id on the element you need to target, or create IDs with crypto.randomUUID() (or another GUID) when building dynamic HTML.

HTML Syntax

syntax.html
<nextid n=" id">

Historical void / editor metadata markup (exact early forms varied). Modern equivalent: <element id="unique-name"> or a generated GUID.

Attributes

Legacy attributes (study only). Prefer the modern column in new work:

AttributeDescriptionTry it
nLegacy next identifier (number, later also a name) for the NeXT editor → use id / GUIDsTry it
idCorrect today — unique identifier on the element itselfTry it
(GUID / UUID)Generate unique values in script when creating nodes dynamicallyTry it

Global Attributes

The <nextid> tag also supports the Global Attributes in HTML (legacy recognition only — do not ship new markup).

Live Preview

Modern browsers ignore <nextid>. This demo shows the replacement: a real element with an id you can choose.

A real element with id. Pick a style, then Apply (or tap a chip).

Preview

Target element (id will update)

id="intro"

HTML Examples

Short, copy-ready snippets. Prefer the modern examples. Use Try It Yourself for a live editor.

Example 1 — Legacy <nextid> (Study Only)

Historical shape. Modern browsers do nothing useful with this tag.

HTML
<!-- Obsolete — do not use in new pages -->
<nextid n="z27">

<p>Editors once used nextid for auto NAME values.</p>
Try It Yourself

How It Works

  1. Recognize the tag as editor metadata from very early HTML / NeXT tools.
  2. Note n held the next identifier value historically.
  3. Expect no behavior in Chrome, Firefox, Safari, or Edge today.
  4. Delete it when cleaning legacy documents.

Example 2 — Modern id Attribute

Give the element you care about a unique id directly.

HTML
<section id="overview">
  <h2>Overview</h2>
  <p>Jump here with <a href="#overview">#overview</a>.</p>
</section>
Try It Yourself

How It Works

  1. Pick a unique id for the target element (document-wide uniqueness).
  2. Link with href="#id" for in-page navigation.
  3. Select in CSS / JS with #id or getElementById.
  4. Skip nextid entirely — the element carries its own identity.

Example 3 — Generate a Unique ID (GUID)

When creating elements dynamically, generate a fresh identifier instead of a shared counter tag.

HTML
<p id="slot">Waiting for id…</p>
<script>
  var el = document.getElementById("slot");
  var uid = (crypto.randomUUID
    ? crypto.randomUUID()
    : "id-" + Date.now());
  el.id = "item-" + uid;
  el.textContent = "Assigned id: " + el.id;
</script>
Try It Yourself

How It Works

  1. Create or select the element you need to identify.
  2. Generate a GUID (prefer crypto.randomUUID() when available).
  3. Assign element.id so CSS, links, and scripts can find it.
  4. This replaces nextid’s job without obsolete markup.

Edge Cases & Pitfalls

obsolete

Copying nextid into new pages

It never belonged in hand-authored HTML5. Delete it; use id instead.

history

Editor-only metadata

NeXT tools wrote nextid automatically. It was not a general “next ID API” for authors.

ids

Duplicate id values

Each id must be unique in the document. Duplicates break links and getElementById.

name

Old anchor name

Early pages used <a name="…"> for fragments. Prefer id on a heading or section today.

support

No browser feature to test

Compat tables show no support. Do not expect polyfills — migrate to id / GUIDs.

validators

HTML checkers flag it

Validators treat nextid as non-conforming obsolete markup.

Browser Support

The <nextid> element is obsolete HTML. It is not part of modern authoring and is not a Node.js, Deno, or Bun API.

✓ Obsolete · No support

<nextid>

Removed from HTML long ago (gone by HTML 3.2 era DTDs). Chrome, Firefox, Safari, Edge, and Opera do not implement it. Use id or GUIDs.

0% Authoring use (new pages)
Google Chrome No
Obsolete
Mozilla Firefox No
Obsolete
Apple Safari No
Obsolete
Microsoft Edge No
Obsolete
Opera No
Obsolete
Samsung Internet No
Obsolete
Internet Explorer No
Obsolete
<nextid> Do not use

Bottom line: Recognize it in archives only. Assign real id values or generate GUIDs for new work.

Key Takeaways

  • Fact: <nextid> is obsolete NeXT-editor metadata, not modern HTML.
  • Replace: use the id attribute on the element you need.
  • Dynamic: generate GUIDs / UUIDs when creating nodes in script.
  • Practice: never add nextid to new tutorials or production pages.

One line: skip <nextid> — identify elements with id or GUIDs.

Default CSS Settings

There is no meaningful user-agent stylesheet for <nextid>. Modern engines do not implement the element’s original purpose.

default.css
/* No standard UA rules for nextid.
   Unknown / obsolete elements typically do not affect layout. */

Style real content with CSS on elements that have a proper id or class.

Frequently Asked Questions

nextid was an early, tool-generated element for the NeXT web editor. It stored the next automatic NAME / identifier value for anchors. Authors were not meant to write it by hand.
No. It is obsolete and non-conforming. Modern browsers do not implement it. Do not use it in new pages.
Set unique id attributes on elements yourself, or generate GUIDs / UUIDs (for example crypto.randomUUID()) when creating dynamic markup.
Historically nextid used an N attribute to hold the next identifier (first a number, later also a name). Treat it as legacy documentation only.
Rarely. It vanished from HTML DTDs long ago (around HTML 3.2). If you see it, remove it and assign real id values where needed.
No. id identifies a specific element in the DOM. nextid was an editor bookkeeping tag and never a modern way to label content.

Next: nobr

Continue with the HTML nobr tag tutorial.

nobr tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

10 people found this page helpful