HTML
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<!-----------------------CSS----------------->
<div>
</div>
<ul>
</ul>
</body>
</html>
---------------------------------CSS-------------------------
1. --------Universal Selector-------- */
*{
font-family:sans-serif;
margin: 0;
padding: 10;
box-sizing: border-box;
background-color: #f0f0f0;
color: #462121;
/* 2. --------Element Selector-------- */
h1 {
color: blue;
text-align: center;
p{
color: green;
font-size: 16px;
/* 3. --------.Class Selector-------- */
.highlight {
background-color: yellow;
font-weight: bold;
padding: 5px;
/* 4. --------#ID Selector-------- */
#unique {
margin: 10px;
padding: 10px;
}
/*----------grouping selectors----------*/
h2,h1,p {
color: darkblue;
text-align: left;
/*----------descendant selector----------*/
div p {
font-style: italic;
margin: 5px 0;
/*----------child selector----------*/
ul > li {
list-style-type: square;
margin: 5px 0;
h1 + p {
color: purple;
font-size: 18px;
h1 ~ p {
color: orange;
font-size: 14px;
/*----------attribute selector----------*/
input[type="text"] {
padding: 5px;
/*----------pseudo-class selector----------*/
a:hover {
color: red;
text-decoration: underline;
background-color: aqua;
/*----------pseudo-element selector----------*/
p::first-letter {
font-size: 2em;