Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Forms Form Basics Create a Textarea

Closing </textarea> necessary?

Interestingly, I was able to successfully submit my code challenge without a closing </textarea> tag. Is one actually necessary? The Workspaces and my browser seem to think so. If a closing tag is necessary, I would like to know why and why it differs from the <input> tag in that way.

index.html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>HTML Forms</title>
  </head>
    <body>

      <form action="index.html" method="post">

        <h1>Sign Up</h1>

        <input type="text" id="name" name="user_name">
        <input type="email" id="mail" name="user_email">
        <input type="password" id="password" name="user_password">

        <textarea id="bio" name="user_bio"></textarea>

      </form>

    </body>
</html>

1 Answer

Sue Dough
Sue Dough
35,800 Points

Absolutely. You need to close it out.

This is what happens if you do not.

http://codepen.io/anon/pen/MwvvdO