Join James Williamson for an in-depth discussion in this video Properly structuring HTML, part of CSS: Selectors.
- Making it easier to write efficient selectors…actually starts with your HTML.…By focusing on writing clean semantic…and consistent HTML,…you make it a lot easier to write efficient styles.…HTML defines the structure of your page…and without a logical consistent structure,…writing efficient styles is impossible.…Here are a few best practices that I recommend…when authoring your HTML.…First, focus on your semantics.…Make sure that that the tag you're using…is appropriate for the content inside of it…and there isn't another element…that expresses the content…in a more meaningful way.…
For example, if you're quoting an author in a book review,…use the blockquote element, not a paragraph.…By using the correct element,…your content is gonna be easier…for user agents to understand…and you won't have to write multiple selectors…for the same element.…Second, make sure that your code is consistent.…Now, let's say that you have sections of content…that promotes specific products…that are gonna appear on several pages within your site.…
- Targeting classes and IDs
- Working with group selectors
- Targeting element attributes
- String matching
- Targeting links with pseudo-class selectors
- Targeting child elements and empty elements
- Targeting parent, child, and sibling elements
- Matching patterns
- Writing efficient selectors
Skill Level Intermediate
CSS: Advanced Typographic Techniqueswith James Williamson3h 14m Intermediate
HTML5: Graphics and Animation with Canvaswith Joe Marini3h 7m Intermediate
1. Basic Selectors
2. Attribute Selectors
3. User Action Pseudo-Class Selectors
4. Structural Selectors
6. Matching Patterns
7. Writing Efficient Selectors
- 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.