From the course: HTML and CSS: Creating Forms

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Basic form styles: Color and size

Basic form styles: Color and size

From the course: HTML and CSS: Creating Forms

Basic form styles: Color and size

- [Instructor] Forms will work fine without any styles at all, but you can use CSS to make them look more consistent, visually appealing, and match the overall design of your site. In the next few videos we'll be looking at how to style individual form elements. With this video, we'll start by just looking at how to style various input types like the ones you see here. Usually elements inherit font styles from the containing element. For example, if you apply font family to a body element, it's inherited by most elements in the body, but that doesn't always work in forms. Some elements may not inherit font family or font size. So for example, in this form you can see the most of the text on here is a Serif font. There's no styles on this page at all, but the browse button and the no file selected text next to it, those are a San Serif, so they're not the same typeface. Normally we'd want all the fonts to be consistent with what we've selected, so we'll make some changes to the CSS so…

Contents