SlideShare une entreprise Scribd logo
1  sur  22
Télécharger pour lire hors ligne
IN A ROCKET
Learn front-end development at rocket speed
CSS CSS FUNDAMENTALS
SelectorsSimple (TYPE / CLASS / ID | UNIVERSAL)
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
CLASS
Selector
ID
Selector
TYPE
Selector
(aka Element selector)
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
TYPE SELECTOR
With this code all paragraphs are shown in green.
A CSS type selector allows you to select and style a HTML element.
p {color: green}
Syntax element {style properties}
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
TYPE SELECTOR
<body>
<p>CSS rocks!</p>
<p>Hello world.</p>
</body>
p { color: green; }
Web page title
index.html
CSS rocks!
Hello world.
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
CLASS
Selector
ID
Selector
TYPE
Selector
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
CLASS SELECTOR
Only the elements with the “ready” class are shown in orange.
A CSS class selector allows you to select and style the elements with the specified class.
.ready {color: orange}
Syntax .classname {style properties}
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
CLASS SELECTOR
<body>
<h1 class="ready">CSS rocks!</h1>
<p>Hello world.</p>
<p class="ready">More content.</p>
</body>
Web page title
index.html
.ready { color: orange; }
CSS rocks!
Hello world.
More content.
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
CLASS SELECTOR: APPLY MULTIPLE CLASSES
<body>
<p class="ready">CSS rocks!</p>
<p class="ready important">Hello world.</p>
</body>
.ready { color: orange; }
.important { font-weight: bold; }
Web page title
index.html
CSS rocks!
Hello world.
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
CLASS SELECTOR: TARGET MULTIPLE CLASSES
<body>
<p class="ready">CSS rocks!</p>
<p class="ready important">Hello world.</p>
</body>
.ready { color: orange; }
.ready.important { font-weight: bold; }
Web page title
index.html
CSS rocks!
Hello world.
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
REFERENCE: W3C - USE CLASS WITH SEMANTICS IN MIND
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
CSS ARCHITECTURE
BEM: Block — Element — Modifier
SUIT CSS: Style tools for UI components
SMACSS: Scalable and Modular Architecture for CSS
OOCSS: Object Oriented CSS
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
CLASS
Selector
ID
Selector
TYPE
Selector
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
ID SELECTOR
Only the element with the “promo” id is shown in red.
A CSS id selector allows you to select and style the element with the specified id.
#promo {color: red}
Syntax #id_value {style properties}
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
ID SELECTOR
<body>
<p id="promo">CSS rocks!</p>
<p>Hello world.</p>
</body>
#promo { color: red; }
Web page title
index.html
CSS rocks!
Hello world.
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
CLASS
Selector
ID
Selector
TYPE
Selector
in a
ROCKET
UNIVERSAL SELECTOR
~ ~ ~
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
UNIVERSAL SELECTOR
With this code all HTML elements are shown in red.
A CSS universal selector allows you to select and style all elements on a page.
* {color: red}
Syntax * {style properties}
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
UNIVERSAL SELECTOR
<body>
<h1>CSS rocks!</h1>
<p>Hello world.</p>
<ul>
<li>First.</li>
<li>Second.</li>
</ul>
<footer>All rights reserved.</footer>
</body>
* { color: red; }
Web page title
index.html
CSS rocks!
Hello world.
• First.
• Second.
All rights reserved.
CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
SOURCE: Selectors Level 3 by W3C.
Learn front-end development at rocket speed
inarocket.com
by miguelsanchez.com
YOU CAN CONTINUE THIS COURSE FOR FREE ON
+ READY TO USE CODE
+ QUIZZES
+ FREE UPDATES
We respect your time

No more blah blah videos. Just straight to
the point slides with relevant information.
Ready to use code

Real code you can just copy and paste into
your real projects.
Step by step guides

Clear and concise steps to build real use
solutions. No missed points.
Learn front-end development at rocket speed
inarocket.com
IN A ROCKET
Learn front-end development at rocket speed
CSS CSS FUNDAMENTALS
SelectorsSimple (TYPE / CLASS / ID | UNIVERSAL)

Contenu connexe

Plus de In a Rocket

12- Learn CSS Fundamentals / Mix & group
12- Learn CSS Fundamentals / Mix & group12- Learn CSS Fundamentals / Mix & group
12- Learn CSS Fundamentals / Mix & groupIn a Rocket
 
11- Learn CSS Fundamentals / Combinators
11- Learn CSS Fundamentals / Combinators11- Learn CSS Fundamentals / Combinators
11- Learn CSS Fundamentals / CombinatorsIn a Rocket
 
10- Learn CSS Fundamentals / Pseudo-elements
10- Learn CSS Fundamentals / Pseudo-elements10- Learn CSS Fundamentals / Pseudo-elements
10- Learn CSS Fundamentals / Pseudo-elementsIn a Rocket
 
9- Learn CSS Fundamentals / Pseudo-classes
9- Learn CSS Fundamentals / Pseudo-classes9- Learn CSS Fundamentals / Pseudo-classes
9- Learn CSS Fundamentals / Pseudo-classesIn a Rocket
 
8- Learn CSS Fundamentals / Attribute selectors
8- Learn CSS Fundamentals / Attribute selectors8- Learn CSS Fundamentals / Attribute selectors
8- Learn CSS Fundamentals / Attribute selectorsIn a Rocket
 
2- Learn HTML Fundamentals / Text Formatting
2- Learn HTML Fundamentals / Text Formatting2- Learn HTML Fundamentals / Text Formatting
2- Learn HTML Fundamentals / Text FormattingIn a Rocket
 
1- Learn HTML Fundamentals / Start in 5 Minutes
1- Learn HTML Fundamentals / Start in 5 Minutes1- Learn HTML Fundamentals / Start in 5 Minutes
1- Learn HTML Fundamentals / Start in 5 MinutesIn a Rocket
 
Learn SUIT: CSS Naming Convention
Learn SUIT: CSS Naming ConventionLearn SUIT: CSS Naming Convention
Learn SUIT: CSS Naming ConventionIn a Rocket
 
Learn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionLearn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionIn a Rocket
 

Plus de In a Rocket (9)

12- Learn CSS Fundamentals / Mix & group
12- Learn CSS Fundamentals / Mix & group12- Learn CSS Fundamentals / Mix & group
12- Learn CSS Fundamentals / Mix & group
 
11- Learn CSS Fundamentals / Combinators
11- Learn CSS Fundamentals / Combinators11- Learn CSS Fundamentals / Combinators
11- Learn CSS Fundamentals / Combinators
 
10- Learn CSS Fundamentals / Pseudo-elements
10- Learn CSS Fundamentals / Pseudo-elements10- Learn CSS Fundamentals / Pseudo-elements
10- Learn CSS Fundamentals / Pseudo-elements
 
9- Learn CSS Fundamentals / Pseudo-classes
9- Learn CSS Fundamentals / Pseudo-classes9- Learn CSS Fundamentals / Pseudo-classes
9- Learn CSS Fundamentals / Pseudo-classes
 
8- Learn CSS Fundamentals / Attribute selectors
8- Learn CSS Fundamentals / Attribute selectors8- Learn CSS Fundamentals / Attribute selectors
8- Learn CSS Fundamentals / Attribute selectors
 
2- Learn HTML Fundamentals / Text Formatting
2- Learn HTML Fundamentals / Text Formatting2- Learn HTML Fundamentals / Text Formatting
2- Learn HTML Fundamentals / Text Formatting
 
1- Learn HTML Fundamentals / Start in 5 Minutes
1- Learn HTML Fundamentals / Start in 5 Minutes1- Learn HTML Fundamentals / Start in 5 Minutes
1- Learn HTML Fundamentals / Start in 5 Minutes
 
Learn SUIT: CSS Naming Convention
Learn SUIT: CSS Naming ConventionLearn SUIT: CSS Naming Convention
Learn SUIT: CSS Naming Convention
 
Learn BEM: CSS Naming Convention
Learn BEM: CSS Naming ConventionLearn BEM: CSS Naming Convention
Learn BEM: CSS Naming Convention
 

Dernier

Registry Data Accuracy Improvements, presented by Chimi Dorji at SANOG 41 / I...
Registry Data Accuracy Improvements, presented by Chimi Dorji at SANOG 41 / I...Registry Data Accuracy Improvements, presented by Chimi Dorji at SANOG 41 / I...
Registry Data Accuracy Improvements, presented by Chimi Dorji at SANOG 41 / I...APNIC
 
SOC Analyst Guide For Beginners SOC analysts work as members of a managed sec...
SOC Analyst Guide For Beginners SOC analysts work as members of a managed sec...SOC Analyst Guide For Beginners SOC analysts work as members of a managed sec...
SOC Analyst Guide For Beginners SOC analysts work as members of a managed sec...Varun Mithran
 
一比一原版美国北卡罗莱纳大学毕业证如何办理
一比一原版美国北卡罗莱纳大学毕业证如何办理一比一原版美国北卡罗莱纳大学毕业证如何办理
一比一原版美国北卡罗莱纳大学毕业证如何办理A
 
一比一定制加州大学欧文分校毕业证学位证书
一比一定制加州大学欧文分校毕业证学位证书一比一定制加州大学欧文分校毕业证学位证书
一比一定制加州大学欧文分校毕业证学位证书A
 
如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证hfkmxufye
 
原版定制(Management毕业证书)新加坡管理大学毕业证原件一模一样
原版定制(Management毕业证书)新加坡管理大学毕业证原件一模一样原版定制(Management毕业证书)新加坡管理大学毕业证原件一模一样
原版定制(Management毕业证书)新加坡管理大学毕业证原件一模一样asdafd
 
一比一原版(PSU毕业证书)美国宾州州立大学毕业证如何办理
一比一原版(PSU毕业证书)美国宾州州立大学毕业证如何办理一比一原版(PSU毕业证书)美国宾州州立大学毕业证如何办理
一比一原版(PSU毕业证书)美国宾州州立大学毕业证如何办理Fir
 
一比一原版英国创意艺术大学毕业证如何办理
一比一原版英国创意艺术大学毕业证如何办理一比一原版英国创意艺术大学毕业证如何办理
一比一原版英国创意艺术大学毕业证如何办理AS
 
Washington Football Commanders Redskins Feathers Shirt
Washington Football Commanders Redskins Feathers ShirtWashington Football Commanders Redskins Feathers Shirt
Washington Football Commanders Redskins Feathers Shirtrahman018755
 
Subdomain enumeration is a crucial phase in cybersecurity, particularly durin...
Subdomain enumeration is a crucial phase in cybersecurity, particularly durin...Subdomain enumeration is a crucial phase in cybersecurity, particularly durin...
Subdomain enumeration is a crucial phase in cybersecurity, particularly durin...Varun Mithran
 
APNIC Updates presented by Paul Wilson at CaribNOG 27
APNIC Updates presented by Paul Wilson at  CaribNOG 27APNIC Updates presented by Paul Wilson at  CaribNOG 27
APNIC Updates presented by Paul Wilson at CaribNOG 27APNIC
 
一比一定制(Temasek毕业证书)新加坡淡马锡理工学院毕业证学位证书
一比一定制(Temasek毕业证书)新加坡淡马锡理工学院毕业证学位证书一比一定制(Temasek毕业证书)新加坡淡马锡理工学院毕业证学位证书
一比一定制(Temasek毕业证书)新加坡淡马锡理工学院毕业证学位证书B
 
一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样
一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样
一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样AS
 
iThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWebiThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWebJie Liau
 
一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样
一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样
一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样AS
 
一比一原版(TRU毕业证书)温哥华社区学院毕业证如何办理
一比一原版(TRU毕业证书)温哥华社区学院毕业证如何办理一比一原版(TRU毕业证书)温哥华社区学院毕业证如何办理
一比一原版(TRU毕业证书)温哥华社区学院毕业证如何办理Fir
 
一比一原版澳大利亚迪肯大学毕业证如何办理
一比一原版澳大利亚迪肯大学毕业证如何办理一比一原版澳大利亚迪肯大学毕业证如何办理
一比一原版澳大利亚迪肯大学毕业证如何办理SS
 
一比一原版(Soton毕业证书)南安普顿大学毕业证原件一模一样
一比一原版(Soton毕业证书)南安普顿大学毕业证原件一模一样一比一原版(Soton毕业证书)南安普顿大学毕业证原件一模一样
一比一原版(Soton毕业证书)南安普顿大学毕业证原件一模一样Fi
 
Free on Wednesdays T Shirts Free on Wednesdays Sweatshirts
Free on Wednesdays T Shirts Free on Wednesdays SweatshirtsFree on Wednesdays T Shirts Free on Wednesdays Sweatshirts
Free on Wednesdays T Shirts Free on Wednesdays Sweatshirtsrahman018755
 
一比一原版布兰迪斯大学毕业证如何办理
一比一原版布兰迪斯大学毕业证如何办理一比一原版布兰迪斯大学毕业证如何办理
一比一原版布兰迪斯大学毕业证如何办理A
 

Dernier (20)

Registry Data Accuracy Improvements, presented by Chimi Dorji at SANOG 41 / I...
Registry Data Accuracy Improvements, presented by Chimi Dorji at SANOG 41 / I...Registry Data Accuracy Improvements, presented by Chimi Dorji at SANOG 41 / I...
Registry Data Accuracy Improvements, presented by Chimi Dorji at SANOG 41 / I...
 
SOC Analyst Guide For Beginners SOC analysts work as members of a managed sec...
SOC Analyst Guide For Beginners SOC analysts work as members of a managed sec...SOC Analyst Guide For Beginners SOC analysts work as members of a managed sec...
SOC Analyst Guide For Beginners SOC analysts work as members of a managed sec...
 
一比一原版美国北卡罗莱纳大学毕业证如何办理
一比一原版美国北卡罗莱纳大学毕业证如何办理一比一原版美国北卡罗莱纳大学毕业证如何办理
一比一原版美国北卡罗莱纳大学毕业证如何办理
 
一比一定制加州大学欧文分校毕业证学位证书
一比一定制加州大学欧文分校毕业证学位证书一比一定制加州大学欧文分校毕业证学位证书
一比一定制加州大学欧文分校毕业证学位证书
 
如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证
如何办理(UCLA毕业证)加州大学洛杉矶分校毕业证成绩单本科硕士学位证留信学历认证
 
原版定制(Management毕业证书)新加坡管理大学毕业证原件一模一样
原版定制(Management毕业证书)新加坡管理大学毕业证原件一模一样原版定制(Management毕业证书)新加坡管理大学毕业证原件一模一样
原版定制(Management毕业证书)新加坡管理大学毕业证原件一模一样
 
一比一原版(PSU毕业证书)美国宾州州立大学毕业证如何办理
一比一原版(PSU毕业证书)美国宾州州立大学毕业证如何办理一比一原版(PSU毕业证书)美国宾州州立大学毕业证如何办理
一比一原版(PSU毕业证书)美国宾州州立大学毕业证如何办理
 
一比一原版英国创意艺术大学毕业证如何办理
一比一原版英国创意艺术大学毕业证如何办理一比一原版英国创意艺术大学毕业证如何办理
一比一原版英国创意艺术大学毕业证如何办理
 
Washington Football Commanders Redskins Feathers Shirt
Washington Football Commanders Redskins Feathers ShirtWashington Football Commanders Redskins Feathers Shirt
Washington Football Commanders Redskins Feathers Shirt
 
Subdomain enumeration is a crucial phase in cybersecurity, particularly durin...
Subdomain enumeration is a crucial phase in cybersecurity, particularly durin...Subdomain enumeration is a crucial phase in cybersecurity, particularly durin...
Subdomain enumeration is a crucial phase in cybersecurity, particularly durin...
 
APNIC Updates presented by Paul Wilson at CaribNOG 27
APNIC Updates presented by Paul Wilson at  CaribNOG 27APNIC Updates presented by Paul Wilson at  CaribNOG 27
APNIC Updates presented by Paul Wilson at CaribNOG 27
 
一比一定制(Temasek毕业证书)新加坡淡马锡理工学院毕业证学位证书
一比一定制(Temasek毕业证书)新加坡淡马锡理工学院毕业证学位证书一比一定制(Temasek毕业证书)新加坡淡马锡理工学院毕业证学位证书
一比一定制(Temasek毕业证书)新加坡淡马锡理工学院毕业证学位证书
 
一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样
一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样
一比一原版(毕业证书)新西兰怀特克利夫艺术设计学院毕业证原件一模一样
 
iThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWebiThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWeb
 
一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样
一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样
一比一原版(毕业证书)新加坡南洋理工学院毕业证原件一模一样
 
一比一原版(TRU毕业证书)温哥华社区学院毕业证如何办理
一比一原版(TRU毕业证书)温哥华社区学院毕业证如何办理一比一原版(TRU毕业证书)温哥华社区学院毕业证如何办理
一比一原版(TRU毕业证书)温哥华社区学院毕业证如何办理
 
一比一原版澳大利亚迪肯大学毕业证如何办理
一比一原版澳大利亚迪肯大学毕业证如何办理一比一原版澳大利亚迪肯大学毕业证如何办理
一比一原版澳大利亚迪肯大学毕业证如何办理
 
一比一原版(Soton毕业证书)南安普顿大学毕业证原件一模一样
一比一原版(Soton毕业证书)南安普顿大学毕业证原件一模一样一比一原版(Soton毕业证书)南安普顿大学毕业证原件一模一样
一比一原版(Soton毕业证书)南安普顿大学毕业证原件一模一样
 
Free on Wednesdays T Shirts Free on Wednesdays Sweatshirts
Free on Wednesdays T Shirts Free on Wednesdays SweatshirtsFree on Wednesdays T Shirts Free on Wednesdays Sweatshirts
Free on Wednesdays T Shirts Free on Wednesdays Sweatshirts
 
一比一原版布兰迪斯大学毕业证如何办理
一比一原版布兰迪斯大学毕业证如何办理一比一原版布兰迪斯大学毕业证如何办理
一比一原版布兰迪斯大学毕业证如何办理
 

7- Learn CSS Fundamentals / Simple selectors

  • 1. IN A ROCKET Learn front-end development at rocket speed CSS CSS FUNDAMENTALS SelectorsSimple (TYPE / CLASS / ID | UNIVERSAL)
  • 2. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com CLASS Selector ID Selector TYPE Selector (aka Element selector)
  • 3. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com TYPE SELECTOR With this code all paragraphs are shown in green. A CSS type selector allows you to select and style a HTML element. p {color: green} Syntax element {style properties}
  • 4. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com HTML CSS Browser TYPE SELECTOR <body> <p>CSS rocks!</p> <p>Hello world.</p> </body> p { color: green; } Web page title index.html CSS rocks! Hello world.
  • 5. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com CLASS Selector ID Selector TYPE Selector
  • 6. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com CLASS SELECTOR Only the elements with the “ready” class are shown in orange. A CSS class selector allows you to select and style the elements with the specified class. .ready {color: orange} Syntax .classname {style properties}
  • 7. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com HTML CSS Browser CLASS SELECTOR <body> <h1 class="ready">CSS rocks!</h1> <p>Hello world.</p> <p class="ready">More content.</p> </body> Web page title index.html .ready { color: orange; } CSS rocks! Hello world. More content.
  • 8. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com HTML CSS Browser CLASS SELECTOR: APPLY MULTIPLE CLASSES <body> <p class="ready">CSS rocks!</p> <p class="ready important">Hello world.</p> </body> .ready { color: orange; } .important { font-weight: bold; } Web page title index.html CSS rocks! Hello world.
  • 9. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com HTML CSS Browser CLASS SELECTOR: TARGET MULTIPLE CLASSES <body> <p class="ready">CSS rocks!</p> <p class="ready important">Hello world.</p> </body> .ready { color: orange; } .ready.important { font-weight: bold; } Web page title index.html CSS rocks! Hello world.
  • 10. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com REFERENCE: W3C - USE CLASS WITH SEMANTICS IN MIND
  • 11. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com CSS ARCHITECTURE BEM: Block — Element — Modifier SUIT CSS: Style tools for UI components SMACSS: Scalable and Modular Architecture for CSS OOCSS: Object Oriented CSS
  • 12. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com CLASS Selector ID Selector TYPE Selector
  • 13. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com ID SELECTOR Only the element with the “promo” id is shown in red. A CSS id selector allows you to select and style the element with the specified id. #promo {color: red} Syntax #id_value {style properties}
  • 14. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com HTML CSS Browser ID SELECTOR <body> <p id="promo">CSS rocks!</p> <p>Hello world.</p> </body> #promo { color: red; } Web page title index.html CSS rocks! Hello world.
  • 15. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com CLASS Selector ID Selector TYPE Selector
  • 17. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com UNIVERSAL SELECTOR With this code all HTML elements are shown in red. A CSS universal selector allows you to select and style all elements on a page. * {color: red} Syntax * {style properties}
  • 18. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com HTML CSS Browser UNIVERSAL SELECTOR <body> <h1>CSS rocks!</h1> <p>Hello world.</p> <ul> <li>First.</li> <li>Second.</li> </ul> <footer>All rights reserved.</footer> </body> * { color: red; } Web page title index.html CSS rocks! Hello world. • First. • Second. All rights reserved.
  • 19. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com SOURCE: Selectors Level 3 by W3C.
  • 20. Learn front-end development at rocket speed inarocket.com by miguelsanchez.com YOU CAN CONTINUE THIS COURSE FOR FREE ON + READY TO USE CODE + QUIZZES + FREE UPDATES
  • 21. We respect your time
 No more blah blah videos. Just straight to the point slides with relevant information. Ready to use code
 Real code you can just copy and paste into your real projects. Step by step guides
 Clear and concise steps to build real use solutions. No missed points. Learn front-end development at rocket speed inarocket.com
  • 22. IN A ROCKET Learn front-end development at rocket speed CSS CSS FUNDAMENTALS SelectorsSimple (TYPE / CLASS / ID | UNIVERSAL)