INFO 253A: Frontend Web Architecture
Kay Ashaolu
Cascading Style Sheets
<strong>hello</strong>
strong {
font-weight: bold;
color: magenta;
font-size: 45px;
}
Just like the funky ASCII symbols, we could set the style of each element
<!-- Warning: Invalid HTML -->
<strong font-color="magenta" font-size="45px">hello</strong>
h1 {
color: #B3D4FC; /* light blue */
text-align: center;
}
What's wrong with the above?
<strong id="logo" class="big red">Pinterest</strong>
strong {
font-weight: bold;
color: red;
font-size: 45px;
}
#logo {
font-size: 64px;
color: red;
}
.symbol {
font-size: 32px;
color: darkblue;
}
<span id="logo">Pinterest</span>
<span class="symbol">PINTEREST</span>
<span class="symbol">New York Times</span>
all h1 or h2 or h3 elements
h1, h2, h3 {
color: #B3D4FC; /* light blue */
text-align: center;
}
table a {
font-weight: bold;
}
table {
font-family: sans-serif;
color: blue
}
.data {
border: 1px solid rgba(0, 0, 0, 0.2);
color: red
}
<table>
<tr><td>Color blue</td></tr>
<tr><td class="data">Color red</td></tr>
</table>
<h1 style="color: brown;
background-color: yellow;">
Individual</h1>