How to fix: Required attribute "cols" not specified

Most Likely Cause and Fix

Your markup contains a <textarea> element that lacks the required cols attribute:

<textarea>
…
</textarea>

Add a suitable cols attribute to each <textarea> element where missing:

<textarea cols="2">
…
</textarea>

What This Error Means

There is a defined set of attributes for each HTML element. Some are required for your markup to be considered valid.

You have omitted the required cols attribute on an element that requires it.

How To Fix It

The specific error message you encountered will refer to a line and column number. This will guide you to the exact point in your markup to which the error relates.

For textarea elements

You've most likely forgotten to add an cols attribute to a <textarea> element:

<textarea>
…
</textarea>

Add a cols attribute to each <textarea> element where missing:

<textarea cols="2">
…
</textarea>

In general

Find the relevant element and add the missing cols attribute.

Discuss, Comment and Improve

Did this help you? Can this page be improved? Let us know!

comments powered by Disqus