You are here: Computer Video TutorialWordpress Tutorial“Textarea”-Required Attribute “Cols” Not Specified
Due to regular updates on WP, if you look for Twenty Eleven theme modification or customization tutorial, first of all, first check this post. Thanks.

“Textarea”-Required Attribute “Cols” Not Specified

by Kimi on September 18, 2010

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.

It says; "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. blog seo

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 ;)

The W3C error codes.

Subscribe new tips via Email:

Was the post helpful? Share it to help others with:

Know better? Feedbacks, or Questions? Shoot! :-)

Please use a name instead of blog name or SEO stuff, otherwise it will be deleted right away.

About checkbox → See more my post:how to get rid of spam bots in wordpress post.

Thank you for visiting, you're always welcomed to be here again!

Previous post:

Next post: