Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
There are three different ways we can add CSS to a page: inline styles, internal styles, and with an external stylesheet. Let’s look at them one by one and discuss their pros and cons. First up are inline styles, where we write the CSS in the HTML file, directly inside an element's tag, using a style attribute.
Project Files
Ways to add CSS to a page
Inline styles
Internal styles
External stylesheets
Further reading
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up