HTML <nextid> Element

The <nextid> element was an extremely early HTML element intended to help automatic HTML editing software generate unique identifiers for a document. It was metadata for authoring tools rather than content intended for visitors to see or interact with.

Historical Syntax

Very early HTML documents could contain markup similar to the following:

<nextid n="z10">

The n attribute stored a value that an HTML authoring program could use when determining the next identifier to generate. The element did not create a visible part of the webpage. This code is shown for historical reference only and should not be used in modern HTML.

Attributes

The <nextid> element historically used the n attribute to store information for HTML authoring software.

Attribute Description
n Specified a value that an authoring tool could use when generating the next unique identifier within the document.

Historical Use

The <nextid> element dates back to the earliest development of HTML, when software tools for creating and editing hypertext documents were still being developed alongside the language itself. Documents needed unique identifiers so links could point to specific locations within a page.

An automatic editor could examine the value stored by <nextid>, generate a new identifier that had not already been used, and then update the stored value for the next identifier it would create.

Unlike most HTML elements, <nextid> was not intended to describe document content or control its visual presentation. Its purpose was to communicate information to software used to edit the document.

Why It Became Obsolete

The <nextid> element quickly became unnecessary as HTML and its authoring tools evolved. Editing software could determine which identifiers were already present in a document and generate new unique values without requiring the document to maintain a separate counter.

Keeping an editor-specific identifier counter inside the HTML also provided no useful information to the browser or to visitors viewing the page. The feature disappeared from later versions of HTML and has no role in modern web development.

Modern Alternative

There is no direct modern replacement for <nextid> because HTML no longer needs an element for tracking the next identifier an editing program should create.

When an element needs a unique identifier, use the standard id attribute:

<h2 id="plant-care">Plant Care</h2>

Another element can then link directly to that location using a fragment identifier:

<a href="#plant-care">Go to Plant Care</a>

Authors and modern development tools are responsible for ensuring that identifier values are unique within the document. No additional HTML element is required to keep track of which identifier should be created next.

Legacy Browser Support

The <nextid> element is a historical artifact from the earliest versions of HTML and does not provide useful functionality in modern browsers. A browser encountering the element may preserve it in the document structure as an unknown or obsolete element, but it should not be relied upon to perform its original authoring-tool function.

Existing <nextid> markup can normally be removed when an old HTML document is updated, provided any actual identifiers and links in the document remain intact.

The <nextid> element has no direct modern element replacement. Modern HTML uses the id global attribute to assign unique identifiers to elements, while the <a> element can use fragment identifiers to link to specific locations within a document.

Specifications

The <nextid> element appeared in the earliest development of HTML but was removed as the language evolved. It is not a conforming element in modern HTML and must not be used in new documents.