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 form build

After finishing html forms with Nick Pettit, I've noticed some forms can be made with <tables>. I like how how Nick did it. Is there a right or wrong way...or just preference on building forms.

Hi Mark,

I fixed your missing html. Whenever you want short pieces of code inline you can wrap it with single backticks. This is usually the key above the tab key.

3 Answers

You can build forms with tables, but as Nick said in those videos its better to leave tables for information and data display.

Sticking to the form fields for forms also makes your code easier for others to see what is going on, and you'll benefit when some new feature is added to the form html in the future and not have to change all your tables to forms to take advantage of these.

<tables> are great for holding data and text in a structured manner. Though you would normally want to use them to primarily display text, they are perfectly fine to be used for holding pictures, form elements such as <input>, and much more. What you shouldn't do is to have your website being the "skeleton" of your websites' structure - that would be a bad practice.

Thanks for the reply guys. That puts it into perspective. I do remember Nick pointing out tables for data, especially when my form has a lot of input fields.

Mark C