





























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






























Selecting Elements to Apply a Style
Here's a p with some text.
Select all elements
Here's a span with some text. Here's another.
Item1 Item2 Item3
Item4 Item5 Item6
div.items a { color: green; font-weight: bold; } inside
Span #1, in the div. Span #2, in the span that's…
Span #3, not in the div at all.
**Direct child of directly contained in a **
Elements with both classes Element with multiple classes
I live in Duckburg.
My best friend is…
h1#header.intro { text-decoration: underline; color: #C00; } HTML and CSS
@import "https://fonts.googleapis.com/css?family=Lato:300,400,900";
text-transform: uppercase; border-bottom: 3px solid #416371; padding-bottom: 20px;} h3 { text-align: right; font-size: 30px; font-weight: normal; margin: 0 0 10px;} p { line-height: 20px; padding-bottom: 5px;} h1, h2, h3 { font-family: forte,Arial,sans-serif;} h1 { font-size: 50px; padding: 10px 0 0; text-align: center; text-transform: uppercase} h2 { font-size: 40px; letter-spacing: 15px; text-align: center;
nav ul li a { color: #ffffff; display: inline-block; font-size: 30px; margin: 5px 2px; padding: 7px 10px 4px; text-transform: uppercase;} nav ul li:first-of-type > a { color: #7CB3E9; font-size: 30px; text-transform: lowercase; } nav ul a[title="sweet tabs"] { color: #8EC45B; font-size: 30px; text-transform: none; } nav,article, nav ul li a,figure { border-radius: 10px; }
article { background-color: #213E4A; margin: 0 0 10px; padding: 20px; height: 390px;} figure { border: 3px solid #142830; float: right; height: 300px; width: 500px; margin-left: 15px; } footer { border-top: 3px solid #142830; padding-top: 15px; margin-bottom: 30px; text-align: center; font-size: 20px; }