Anchor target Values Lookup

Classifies standard HTML navigable target keywords or valid named targets. Empty values default to the current context. Browser-specific target extensions are excluded.

Description

A hyperlink target selects an existing named context or a standard target keyword.

A hyperlink target selects an existing named context or a standard target keyword. An empty target has default current-context behavior rather than being a valid named target.1

The tool returns kind, keyword, valid. The fields describe the supplied local pattern or effective state, or contain the formatted markup shown below.

When to use Anchor target Values Lookup

Use this for the following task: Classifies standard HTML navigable target keywords or valid named targets. Empty values default to the current context. Browser-specific target extensions are excluded. Provide the requested local fields extracted from the relevant element or attribute.

How to use Anchor target Values Lookup and understand its results

  1. Prepare the parsed element names, attribute values or direct element-child lists requested below. Keep attribute presence separate from its value.
  2. Enter target according to the field table, then run the tool.
  3. Read kind, keyword, valid. Check the effective state, recognized-token flags or generated markup against the rules below.
  4. Correct any reported local mismatch and check the resulting markup in its intended document and browser context.
Input fieldMeaningValue type and boundsRequirement
targetTargetstring; maximum text length 100000Required

Supply a raw parsed target string. Recognize keywords case-insensitively; otherwise accept a nonempty name not starting underscore unless it contains both a tab/newline/carriage return and <. Return kind, normalized keyword and valid.

known keywords: _blank, _self, _parent, _top; other nonempty nonunderscore names use the named-target rule

The symbols and boundary conditions refer to the supplied fields and the implementation described above.

Output fieldMeaningValue type
kindKindstring
keywordKeywordstring
validValidboolean
json
{
  "input": {
    "target": "_BLANK"
  },
  "output": {
    "kind": "keyword",
    "keyword": "_blank",
    "valid": true
  }
}

Limitations and assumptions

An empty value yields kind=empty and valid=false despite its default browser behavior. The tool does not trim or locate a browsing context; browser-specific target extensions are excluded.

The tool does not fetch a page, run a browser or validate an entire HTML document. Malformed tool requests produce input errors; valid requests can still report unrecognized values or failed local checks.

Alternative or Complementary methods

Choose target=_blank rel=opener Security Check when you need its operation: Resolves opener behavior requested by an anchor with target=_blank under modern HTML rules. Implicit noopener applies unless opener is present; noreferrer or noopener takes precedence. Choose Anchor download Filename Attr for the complementary operation: Serializes a suggested filename into a double-quoted anchor download attribute. Empty filename requests downloading without a suggested name. Browser origin policy and filesystem filename sanitization are separate.

Background reference: HTML Standard: Anchor target Values Lookup.

References

  1. HTML Standard: Anchor target Values Lookup — WHATWG

Similar or alternative tools

  • target=_blank rel=opener Security Check

    Resolves opener behavior requested by an anchor with target=_blank under modern HTML rules. Implicit noopener applies unless opener is present; noreferrer or noopener takes precedence.

  • Anchor download Filename Attr

    Serializes a suggested filename into a double-quoted anchor download attribute. Empty filename requests downloading without a suggested name. Browser origin policy and filesystem filename sanitization are separate.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies