You should use both. The cols and rows attributes for textarea are good for specifying a default size for this element. Consider these attributes to be only for browsers with difficulty with CSS. Use the CSS styles to make the textarea look exactly how you want. The CSS will override the inline attributes anyway.
Should I size a textarea with CSS width / height or HTML cols / rows attributes?
Every time I develop a new form that includes a `textarea` I have the following dilemma when I need to specify its dimensions:Use **CSS** or use the `textarea`'s attributes `cols` and `rows`?What are the pros and cons of each method?What are the semantics of using these attributes?How is it usually done?
Follow
1
Add comment
More
Report
1 Expert Answer
Still looking for help? Get the right answer, fast.
Ask a question for free
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Find an Online Tutor Now
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.