Premium Only Content

Styling with CSS by Id and Class Selectors plus Bootstrap Button Example
The lecture shows you how to select an HTML element for styling with CSS using its id or class attribute instead of using the type selector that targets all elements of a specific name.
Using a type selector is usually not the best practice because HTML web pages usually have hundreds of elements and changing all of them at once to comfort to a specific style might cause inconsistencies in the design.
You can select a specific element for styling with CSS using its id attribute. Only one, and only one, element may have that unique identifier.
If you need to select multiple elements for styling under the same ruleset, you can use the class attribute. It turns out using a class is usually the most popular and safe choice for best practice. When in doubt, just use a class.
The lecture also gives the example of leveraging CSS code already written by somebody else, like the Bootstrap design system. Because the class definitions are already written for you, all you have to do is use the class name if you want to adopt the same style for your web page element, provided you link the Bootstrap spreadsheet to make it available in your document.
-
23:08
DeVory Darkins
1 day ago $10.62 earnedDemocrats STUNNED by Trump meeting as Omar EMBARRASSES after shocking statement
15.6K87 -
2:17:10
qixso
13 hours ago $1.94 earnedBO7 ON THE WAY !
22.5K3 -
2:07:47
Side Scrollers Podcast
19 hours agoHasan SCARED To Attend Twitch Con + EA Devs CRASH OUT Over Saudi Sale + More | Side Scrollers
27.6K4 -
15:10
GritsGG
15 hours agoInsane Regain Dubular on Warzone Duos w/ Bobby Poff!
9.05K -
2:48:00
BlabberingCollector
1 day agoReacting To Emma Watson / Jay Shetty Interview, Reading JKR Tweets!
10.1K5 -
17:52
The Pascal Show
1 day ago $5.03 earned'PARENTS DON'T BELIEVE HE DID IT!' Candace Owens Says Tyler Robinson's Parents Don't Think He Did It
25.3K27 -
1:46:23
The HotSeat
15 hours agoCommander In Chief and SECWAR Address The Troops, and I AM HERE FOR IT!
43.7K19 -
2:07:00
The Michelle Moore Show
2 days ago'President Trump on Radicals, Susie Wiles In Question Again, Erika Kirk Evokes More Questions, Spiritual Calamity Coming For The President?' Guest, Mark Taylor: The Michelle Moore Show (Sept 29, 2025)
49.6K112 -
LIVE
Lofi Girl
2 years agoSynthwave Radio 🌌 - beats to chill/game to
427 watching -
33:53
Stephen Gardner
11 hours ago🔥Antifa PANICS as Trump UNLEASHES Secret Weapon!
48.8K61