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.
-
1:59:08
The Charlie Kirk Show
3 hours agoCharlie’s 32nd Birthday + Medal of Freedom | Sec. Bessent, Lavorgna, Zeldin, Sen. Lee | 10.14.25
74.6K81 -
LIVE
StoneMountain64
1 hour agoBattlefield 6 Sniping and Unlocking SNIPERS from LONG RANGE
98 watching -
2:50:25
Side Scrollers Podcast
3 hours agoHasan CAUGHT Red Handed + Hogwarts Legacy 2 “Boycott” + Arbys SUED + More | Side Scrollers
21.6K3 -
1:08:02
Timcast
3 hours agoTrump DOJ DEFIES THE COURTS, Tear Gasses Anti Ice Rioters, Civil War Fears Escalate
124K143 -
LIVE
Viss
5 hours ago🔴LIVE - Give Us The Battlefield 6 Battle Royale! - BF6 & PUBG
86 watching -
19:37
Welker Farms
17 days ago $0.06 earnedTraining Up the NEXT Generation of Farmers - Faith, Family, & Farming!
2.71K2 -
2:29:00
Steven Crowder
5 hours agoTrump is Winning so Big Even The Left Can't Deny It: Featuring Jason Calacanis of the All In Podcast
351K415 -
56:22
TheAlecLaceShow
3 hours agoTrump Signs Historic Peace Deal | Hostages Released | Guests: Matt Schlapp | The Alec Lace Show
14.1K -
1:03:00
The Rubin Report
4 hours agoObama Can’t Hide His Bitterness at Trump After Middle East Peace Deal
42.6K72 -
1:36:03
The Mel K Show
4 hours agoMORNINGS WITH MEL K - Charting a New Path & Ending Endless Wars - 10-14-25
31.8K3