Issue
How can I add an attribute to html element in React js. I want to set <html lang="en">
to solve WCAG Level A validation issue.
I added html-element-attributes module but no idea about how to use it.
Anybody please help to get a way to add this lang attribute to html element?
Solution
you need React helmet for this. Put this block in any top level component's render:
<Helmet>
<html lang="en" />
</Helmet>
Answered By - Fawaz Answer Checked By - Clifford M. (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.