Favicon link rel sizes Lookup
Checks parsed link rel and icon sizes tokens against the standard any or positive width x height syntax without leading zeros. Dimensions are returned as exact decimal strings.
Description
Icon sizes metadata advertises raster dimensions or any for a scalable icon.
Icon sizes metadata advertises raster dimensions or any for a scalable icon. The syntax of these tokens is separate from the actual dimensions and format of an icon resource.1
The tool returns iconRelation, validSizes, scalable, widths, heights. The fields describe the supplied local pattern or effective state, or contain the formatted markup shown below.
When to use Favicon link rel sizes Lookup
Use this for the following task: Checks parsed link rel and icon sizes tokens against the standard any or positive width x height syntax without leading zeros. Dimensions are returned as exact decimal strings. Provide the requested local fields extracted from the relevant element or attribute.
How to use Favicon link rel sizes Lookup and understand its results
- Prepare the parsed element names, attribute values or direct element-child lists requested below. Keep attribute presence separate from its value.
- Enter rel, sizes according to the field table, then run the tool.
- Read iconRelation, validSizes, scalable, widths, heights. Check the effective state, recognized-token flags or generated markup against the rules below.
- Correct any reported local mismatch and check the resulting markup in its intended document and browser context.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| rel | Rel | string; maximum text length 100000 | Required |
| sizes | Sizes | string; maximum text length 100000 | Required |
Supply rel and sizes strings. Tokenize HTML ASCII whitespace, fold case, reject duplicate size tokens, recognize any and collect valid dimension pairs as exact decimal strings.
dimension token = positive decimal width x positive decimal height with no leading zeros The symbols and boundary conditions refer to the supplied fields and the implementation described above.
| Output field | Meaning | Value type |
|---|---|---|
| iconRelation | Icon Relation | boolean |
| validSizes | Valid Sizes | boolean |
| scalable | Scalable | boolean |
| widths | Widths | list of string |
| heights | Heights | list of string |
{
"input": {
"rel": "icon",
"sizes": "16x16 32X32 any"
},
"output": {
"iconRelation": true,
"validSizes": true,
"scalable": true,
"widths": [
"16",
"32"
],
"heights": [
"16",
"32"
]
}
} Limitations and assumptions
icon and apple-touch-icon both set iconRelation. Empty sizes is accepted; invalid tokens make validSizes false while valid pairs remain in the arrays. No icon file is fetched or measured.
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 Web App Manifest link rel Lookup when you need its operation: Checks a parsed link for the manifest relation and a nonempty href. This local check does not fetch or validate the manifest document. Choose link preload as= Types List for the complementary operation: Checks the six current HTML preload as destinations and translates fetch to the empty Fetch destination. Modulepreload has a separate vocabulary and is outside this lookup.
Background reference: HTML Standard: Favicon link rel sizes Lookup.
References
Similar or alternative tools
- Web App Manifest link rel Lookup
Checks a parsed link for the manifest relation and a nonempty href. This local check does not fetch or validate the manifest document.
- link preload as= Types List
Checks the six current HTML preload as destinations and translates fetch to the empty Fetch destination. Modulepreload has a separate vocabulary and is outside this lookup.