From the course: HTML & CSS: Creating Forms

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Basic form styles: Text color and size

Basic form styles: Text color and size - HTML Tutorial

From the course: HTML & CSS: Creating Forms

Start my 1-month free trial

Basic form styles: Text color and size

- [Tutor] Forms will work perfectly okay 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 a color and size of text on various input types. 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, on this form you can see that most of the text on here is a serif text, there's no styles on this page at all or you can see already on the Choose File button and No file chosen text next to it, those are a sans serif, so they're obviously not the same typeface, also if you type in the fields here, that's also a sans serif, so it's a…

Contents