Simple selectors
Simple selectors là tạo kiểu dựa trên tên thẻ,
id
,class
. Ví dụ:
/* Tạo kiểu cho thẻ <p> */
p {
color: red;
text-align: center;
}
/* Tạo kiểu cho những thẻ có class = "heading" */
.heading {
font-size: large;
color: blue;
}
/* Tạo kiểu cho thẻ có id = "title" */
#title {
font-size: large;
text-decoration: underline;
}
Last updated