First off, I’m using Shopify. I have a textarea
and it is filled with white spaces when the page loads. I know why, it’s because of the HTML, but I don’t know why the browser is served different HTML than the HTML I created.
Here is my code:
<textarea name="contact[body]" id="ContactFormMessage" placeholder="Your message...."></textarea>
And this is what is served to the browser:
<textarea rows="10"
name="contact[body]"
id="ContactFormMessage"
placeholder="Your message">
</textarea>
Anyone know what’s going on?
2
Answers
you have empty space between beginning textarea tag and closing tag. you need to remove that.
You have no value in your textarea block. If you wanted the textarea to be initialized with “foo”, you would do
As an aside, the square brace is not a valid character for the name attribute. (See https://www.w3.org/TR/html401/types.html#h-6.2)