HTML Issues
An HTML issue corresponds to an issue found on a given web page when being checked by the HTML validator.
Attributes
- ID
- Unique ID for this HTML issue.
- Issue Type
- Error or Warning
- Issue Sub Type
- Optional, provides additional info on the type of the issue.
- Message
- Brief description of the issue.
- HTML
- Code snippets showing the affected elements, each one including an extract and its coordinates.
- Tags
- Comma-separated list of tags to categorize this issue.
- Inserted At
- Timestamp when the HTML Issue was created.
- Updated At
- Timestamp when the HTML Issue was last updated.
Relationships
- Report
- The Report that this HTML Issue belongs to.
- Web Page
- The Web Page that this HTML Issue belongs to.
Example
Example: HTML Issue
{
"data": {
"attributes": {
"how_many": 3,
"html": [
{
"coordinates": {
"first_column": null,
"first_line": 210,
"hilite_length": 1,
"hilite_start": 15,
"last_column": 22,
"last_line": 210
},
"extract": "=\"game-news\" id=\"game-news\" >G"
},
{
"coordinates": {
"first_column": null,
"first_line": 211,
"hilite_length": 1,
"hilite_start": 15,
"last_column": 117,
"last_line": 211
},
"extract": "f0%9f%8d%93\" id=\"madelines-bac"
},
{
"coordinates": {
"first_column": null,
"first_line": 261,
"hilite_length": 1,
"hilite_start": 15,
"last_column": 48,
"last_line": 261
},
"extract": "f0%9f%92%a8\" id=\"driftmania-%f"
}
],
"tags": ["duplicate attribute"],
"inserted_at": "2024-03-05T12:44:34",
"issue_sub_type": null,
"issue_type": "error",
"message": "Duplicate attribute “id”.",
"updated_at": "2024-03-05T12:44:34"
},
"id": "144375908",
"relationships": {
"report": {
"links": {
"related": "https://rocketvalidator.com/api/v1/reports/72eecced-8472-41fc-b194-59b7496c7576"
}
},
"web_page": {
"links": {
"related": "https://rocketvalidator.com/api/v1/reports/72eecced-8472-41fc-b194-59b7496c7576/web_pages/8413311"
}
}
},
"type": "html_issue"
},
"jsonapi": {
"version": "1.0"
}
}
List HTML issues on a web page
To list the HTML issues found on a web page, send a GET
request to /api/v1/reports/$REPORT_ID/web_pages/$WEBPAGE_ID/html_issues
.
Example: list the HTML issues found on a web page
GET /api/v1/reports/$REPORT_ID/web_pages/$WEBPAGE_ID/html_issues
Filtering by message
To include only the HTML issues of a given kind, use the filter[message]
option.
Example: filter HTML issues for a web page about "table"
GET /api/v1/reports/$REPORT_ID/web_pages/$WEB_PAGE_ID/html_issues?filter[message]=table
Filtering by tag
To include only the issues for a given tags
combination, use the filter[tags]
options:
filter[tags][mode]
setting the tag combination mode, which can beany
,all
ornone
.filter[tags][list]
including a comma-separated list of tags.
Example: filter HTML issues for a web page tagged with "label"
GET /api/v1/reports/$REPORT_ID/web_pages/$WEB_PAGE_ID/html_issues?filter[tags][mode]=any&filter[tags][list]=label
Retrieve an HTML issue
To show an individual HTML issue on a web page, send a GET
request to /api/v1/reports/$REPORT_ID/web_pages/$WEB_PAGE_ID/html_issues/$HTML_ISSUE_ID
Example: retrieve HTML issue for a web page
GET `/api/v1/reports/$REPORT_ID/web_pages/$WEBPAGE_ID/html_issues/$HTML_ISSUE_ID