Files
Randell Dawson 1494a50123 fix(guide): restructure curriculum guide articles (#36501)
* fix: restructure certifications guide articles
* fix: added 3 dashes line before prob expl
* fix: added 3 dashes line before hints
* fix: added 3 dashes line before solutions
2019-07-24 13:29:27 +05:30

599 B

title
title
Use CSS Selectors to Style Elements

Use CSS Selectors to Style Elements


Problem Explanation

CSS selectors are widely used to apply styling to all instances of a particular element.

To apply the color purple to all the h2s on the page, you can define the following CSS inside a <style></style> block.

h2 {
  color: purple;
}

This will apply the color purple to all <h2> headings. If you are using the style="color: purple" attribute on each <h2> element, you can remove it and instead define it in a single place inside a <style></style> block.