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.
- Coordinates
- Where in the document the HTML issue was found. Indicates first and last line, first and last column, and the highlighted code as start and length.
- Extract
- Snippet showing the affected HTML code. Use the highlight coordinates to determine the exact portion affected by the 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.
- 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
{
"attributes": {
"coordinates": {
"first_column": 150,
"first_line": 8,
"hilite_length": 4,
"hilite_start": 10,
"last_column": 153,
"last_line": 8
},
"extract": "none;left:none;right",
"id": 64398238,
"inserted_at": "2020-04-02T12:44:45",
"issue_sub_type": null,
"issue_type": "error",
"message": "CSS: “left”: “none” is not a “left” value.",
"updated_at": "2020-04-02T12:44:45"
},
"id": "64398238",
"relationships": {
"report": {
"links": {
"related": "https://rocketvalidator.com/api/v0/reports/56b6"
}
},
"web_page": {
"links": {
"related": "https://rocketvalidator.com/api/v0/reports/56b6/web_pages/2884097"
}
}
},
"type": "html_issue"
}
List HTML issues on a web page
To list the HTML issues found on a web page, send a GET
request to /api/v0/reports/$REPORT_ID/web_pages/$WEBPAGE_ID/html_issues
.
Example: GET https://rocketvalidator.com/api/v0/reports/$REPORT_ID/web_pages/$WEBPAGE_ID/html_issues
{
"data": [
{
"attributes": {
"coordinates": {
"first_column": 1,
"first_line": 1,
"hilite_length": 109,
"hilite_start": 0,
"last_column": 109,
"last_line": 1
},
"extract": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html",
"id": 59734815,
"inserted_at": "2020-02-28T13:01:34",
"message": "Obsolete doctype. Expected “<!DOCTYPE html>”.",
"sub_type": null,
"type": "error",
"updated_at": "2020-02-28T13:01:34"
},
"id": "59734815",
"relationships": {
"report": {
"links": {
"related": "https://rocketvalidator.com/api/v0/reports/9314c"
}
},
"web_page": {
"links": {
"related": "https://rocketvalidator.com/api/v0/reports/9314c/web_pages/472"
}
}
},
"type": "html_issue"
},
{
"attributes": {
"coordinates": {
"first_column": 17,
"first_line": 21,
"hilite_length": 3,
"hilite_start": 10,
"last_column": 19,
"last_line": 21
},
"extract": " pading: 4px;\n ",
"id": 59734817,
"inserted_at": "2020-02-28T13:01:34",
"message": "CSS: “pading”: Property “pading” doesn't exist.",
"sub_type": null,
"type": "error",
"updated_at": "2020-02-28T13:01:34"
},
"id": "59734817",
"relationships": {
"report": {
"links": {
"related": "https://rocketvalidator.com/api/v0/reports/9314c"
}
},
"web_page": {
"links": {
"related": "https://rocketvalidator.com/api/v0/reports/9314c/web_pages/472"
}
}
},
"type": "html_issue"
}
],
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "https://rocketvalidator.com/api/v0/reports/9314c/web_pages/472/html_issues?page[number]=1&page[size]=25"
}
}