"Uncle used to skim work, sellin' nicks at night
I was only 8 years old, watching Nick at Nite"
Tomorrow Friday Jan. 28th 6:00pm ET
Text
source: mdn
not that kind...
<h1> MOST IMPORTANT </h1>
<h2> .............. </h2>
<h3> .............. </h3>
<h4> .............. </h4>
<h5> .............. </h5>
<h6> .............. </h6>
<p> Paragraph </p>
<span> Short text </span>
<pre> Preserves Whitespace </pre>
<div> </div>
<section> </section>
<article> </article>
<aside> </aside>
<header> </header>
<footer> </footer>
It is best practice to put CSS in it's own file and link to it from the <head> !
Â
<link rel="stylesheet" href="css/style.css">
p{
color: red;
font-weight: bold;
}
p{
color: red;
font-weight: bold;
}
p{
color: red;
font-weight: bold;
}
p{
color: blue;
}
Â
What comes below, can override what came above
Â
h1{
color: red;
}
h2{
color: #FF0000;
}
p{
color: rgba(255,0,0,1);
}
span{
color: hsla(0, 100%, 50%,1);
}
<head>
<link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;
400;700&display=swap" rel="stylesheet">
</head>
p{
font-family: 'Source Sans Pro', 'Helvetica' sans-serif;
}
html
Â
css
<head>
<link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;
400;700&display=swap" rel="stylesheet">
</head>
p{
font-family: 'Source Sans Pro', 'Helvetica' sans-serif;
font-weight: 700;
}
html
Â
css
https://lmgtfy.com/?q=italicize+text+html+mdn&s=d
Â
Â
section > p {
color: red;
}
<section>
<p>Hello, Twitch!</p>
</section>
section p {
color: red;
}
<section>
<article>
<p>Hello, Twitch!</p>
</article>
</section>
p + p {
color: red;
}
Â
<section>
<p>Hello, Twitch!</p>
<p>Hello, Youtube!</p>
</section>
#zebra {
color: red;
}
Only one id with the same value per document
<section>
<p>Hello, Twitch!</p>
<p id="zebra">Hello, Youtube!</p>
</section>
.bob {
color: red;
}
Multiple with same value allowed per document
<section>
<p class="robot">Hello, Twitch!</p>
<p id="zebra" class="bob">Hello, Youtube!</p>
<p class="bob">Goodbye, Mixer!</p>
</section>
#pizza .jumanjiOriginalMovie {
color: red;
}
<section id="pizza">
<p class="jumanjiOriginalMovie">Hello, Twitch!</p>
<p id="car" class="hello">Hello, Youtube!</p>
<p class="goodbye">Goodbye, Mixer!</p>
</section>
#dietCoke p.dominosPizza.bob {
color: red;
}
<section id="dietCoke">
<p class="robot unicorn">Hello, Twitch!</p>
<p id="zebra" class="bob dominosPizza">Hello, Youtube!</p>
<p class="bob">Goodbye, Mixer!</p>
</section>
#dietCoke #zebra {
color: red !important;
}
<section id="dietCoke">
<p class="robot unicorn">Hello, Twitch!</p>
<p id="zebra" class="bob dominosPizza">Hello, Youtube!</p>
<p class="bob">Goodbye, Mixer!</p>
</section>
not that kind...
By css-tricks
vs.
@media screen and (max-width: 600px) {
h1 {
color: blue;
}
}
Make 15 minutes of pain responsive