Validate the <textarea></textarea> W3C error codes;required attribute “cols” not specified.
I had this small problem while trying to validate my comment form in wordpress comment template.
It is about the <textarea></textarea> code where people type in their comments.
Here is the screenshot of the error.
"required attribute "cols" not specified"
First, i made my file backup in my cPanel (you can of course back it up in your desktop or notepad).
And then i have checked the comment.php file in my dashboard and find the original code;
<p><textarea name="comment" id="comment" rows="7" tabindex="4"></textarea></p>
To fix it, we have to add cols, see reference in w3schools.com.
So we have to add the cols=”25″ where 25 specifies the width of 25 characters.
The end of the correct code;
<p><textarea name="comment" id="comment" rows="7" cols="25" tabindex="4"></textarea></p>
Try to revalidate again, and it will be valid ;)