culldog88
culldog88

Reputation: 93

HTML text area not displaying with placeholder

When I render the webpage, the input field displays the placeholder "enter key word" but the textarea does not display the placeholder. Where am I going wrong?

 <div>
        <textarea id="paragraph" rows="5" cols="35" placeholder="Enter the paragraph here..." value = ''>
        </textarea>
    </div>
    <div>
        <input type="text" id="word" placeholder="Enter the keyword here..." value="">
    </div>

Upvotes: 0

Views: 48

Answers (1)

RABI
RABI

Reputation: 732

Change this

<div>
    <textarea id="paragraph" rows="5" cols="35" placeholder="Enter the paragraph here..." value = ''>
    </textarea>
</div>

to this

<div>
    <textarea id="paragraph" rows="5" cols="35" placeholder="Enter the paragraph here..." value = ''></textarea>
</div>

The text area is taking blank spaces as values since there is space before the closing tag

Upvotes: 4

Related Questions