select div with id css code example
Example 1: css how to style id
/*put a # infront of the id*/
/*<section id="example"></section>*/
#example{
margin: auto;
}
Example 2: css selectors
* {
color: pink;
}
h1, h2 {Select all h1 and h2}
li a {select all anchor inside a list}
h1 + p {select all p placed after an h1}
div > li {all li directly in a div}
Example 3: CSS how to select ID
#id-selector-name{
font-size: 20px;
}
.class-selector-name{
color: green;
}