search
[last updated: 2024-01-12]
CSS
Great ref: (link to:) CSS Selectors
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors
http://web.simmons.edu/~grovesd/comm244/notes/week4/css-selectors
https://www.tutorialspoint.com/wildcard-selectors-and-in-css-for-classes
-----
--------------------------------------------------------------------
h1 {color: red;}
hi {color: red;}
will apply the color property red to all h1 elements,
*??? {color: red;}
You can do this with: Classes or ID's.
If you have several instances of an element that you want to receive the "special" formatting rule, then use Classes.
if you only have one instance of an element that you want to format with your rule, then use ID's.
<body>
<h1 id="specialHeader">some text</h1>
</body>
ID names are case-sensitive, must start with an alpha character, and cannot contain spaces or tabs.
#specialHeader { color: red; }
<body>
<h1 class="redHeader">some text</h1>
</body>
Class names are case-sensitive.
.redHeader { color: red; }
'pseudo classes'
'attribute selectors'