How to Add CSS Using ID Attribute - Simple Beginner Tutorial

Published: 09 January 2022
on channel: 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...  


On this page of the site you can watch the video online How to Add CSS Using ID Attribute - Simple Beginner Tutorial with a duration of hours minute second in good quality, which was uploaded by the user Front End Beginners 09 January 2022, share the link with friends and acquaintances, this video has already been watched 1,815 times on youtube and it was liked by 18 viewers. Enjoy your viewing!