Well-structured HTML helps define content and give it meaning. Carrie Dils shares best practices for applying CSS to HTML.
- [Instructor] I'd like to take a few minutes…to talk about how CSS works with HTML structure.…Now, remember, that to style elements in your documents,…you'll need to write selectors that target those elements.…The more efficient and logical your HTML,…the easier it is to write efficient CSS.…CSS works with the structure of your HTML document,…allowing the browser to parse the HTML code,…find the right element and style it accordingly.…Having well-structured, consistent HTML…and being familiar with that structure,…makes it a lot easier to write CSS for it.…
Let's talk about a few best practices…that you can follow when authoring HTML…and how this impacts your CSS.…First, try to use meaningful names for classes and IDs.…Let's look at this example in my text editor here.…Here I've got lots of classes and IDs to define styling…for each of these individual elements.…As far as functionality goes, this would work just fine…but in terms of proper HTML structure, this is not good.…Well-structured HTML should help define your content…
- What is CSS?
- Understanding how CSS works with HTML
- Applying fonts
- Understanding the classic box model
- Setting margins and padding
- Positioning elements
- Basic CSS layout concepts
- Media types and media queries
- Working with CSS frameworks and CSS grids
- Creating responsive layouts
- Tools that help you write and maintain CSS
Skill Level Beginner
1. CSS Basics
2. CSS Specifications
3. Common CSS Concepts
4. CSS Layouts
5. Working with CSS
6. Responsive CSS
7. Going Further with CSS
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.