How to Add CSS Using ID Attribute - Simple Beginner Tutorial

Veröffentlicht am: 09 Januar 2022
auf dem Kanal: 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...  


Auf dieser Seite können Sie das Online-Video How to Add CSS Using ID Attribute - Simple Beginner Tutorial mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Front End Beginners 09 Januar 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 1,815 Mal angesehen und es wurde von 18 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!