How to Add CSS Using ID Attribute - Simple Beginner Tutorial

Publié le: 09 janvier 2022
sur la chaîne: Front End Beginners
1,815
18

In this video, we look at how to add CSS styles to our HTML elements using the ID attribute.

The ID attribute is a unique identifier, which can only be used on a single HTML element.

Using the CSS ID selector—the # symbol—we can target the ID of individual elements in our HTML documents and apply styles to them directly.

The ID selector is more specific than both the "class" and "type" selectors, so it overrides any styles applied using either of these.

I hope you found this video helpful. If you have any questions, please leave them in the comments below and I'll do my best to answer as soon as possible.

TIMESTAMPS:
00:00 Introduction
00:11 What an ID is and how to create one in HTML
01:20 How to add CSS using ID attribute
03:16 ID specificity explained
06:32 Summary

WATCH NEXT:
• How to Create a CSS Class in HTML -    • How to Create a CSS Class in HTML - H...  
• How to Add a Favicon to Your HTML Website -    • How to Add a Favicon (Logo Icon) to Y...  
• How to Create a CSS Flexbox Sidebar and Content Layout -    • How to Create a CSS Flexbox Sidebar a...  


Sur cette page du site, vous pouvez voir la vidéo en ligne How to Add CSS Using ID Attribute - Simple Beginner Tutorial durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Front End Beginners 09 janvier 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 1,815 fois et il a aimé 18 téléspectateurs. Bon visionnage!