we've styled the HTML tags
<h1></h1> with the CSS selector h1, <p></p> with p, and so on.any HTML element can be a CSS selector! You can modify
<ul>s, <table>s, and even the entire<body> by selecting ul, table, and body, respectively-it's possible to nest HTML elements inside one another, So what if you want to grab
<p>s that are inside two <div>s, and not all<p>.You select those in the CSS tab like this:div div p{
/*CSS stuff!*/
}
you can use *{
} to CSS styling to every element on the page:
Parents, children, and siblings
If you think of the
<html> tag as the trunk of the tree,<head> and<body>—as its children. Both tags are children of <html>, and <html> is theirparent element.they are siblings.Can you swing it?
<p> that is nested inside a <div> that is nested somewhere inside another <div>. If you want to grab direct <p> ement that is directly nested inside another element, with no elements in between—you can use the> symbol,
Không có nhận xét nào:
Đăng nhận xét