1. URL
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Document Title</title>
</head>
<body>
<!-- content goes here-->
</body>
<html>
Selector | Example | Example description | CSS |
---|---|---|---|
.class | .intro | Selects all elements with class="intro" | 1 |
#id | #firstname | Selects the elements with id="firstname" | 1 |
* | * | Selects all elements | 2 |
element | p | Selects all < p > elements | 1 |
element,element | div,p | Selects all < div > elements and all < p > elements | 1 |
element element | div p | Selects all < p > elements inside < div > elements | 1 |
element>element | div>p | Selects all < p > elements where the parent is a < div > elements | 2 |
element+element | div+p | Selects all < p > elements that are placed immediately after < div > elements | 2 |