css3 스타일은 부모 태그로부터 상속된다. 하지만 모든 프로퍼티가 상속되지는 않는다.
poiemaweb 참조
h3,li { color: blue; }
<head>
<style>
.box { border: 3px solid blue; }
</style>
</head>
<body>
<div class="box">box</div>
<div class="box">box</div>
<div class="box">box</div>
</body>
<head>
<style>
#box { border: 3px solid blue; }
</style>
</head>
<body>
<div id="box">box</div>
<div id="small-box">box</div>
<div id="big-box">box</div>
</body>
<head>
<style>
p > strong { color: blue; }
</style>
</head>
<body>
<div>
<p>
<strong>
box
</strong>
</p>
</div>
</body>
<head>
<style>
div strong { color: blue; }
</style>
</head>
<body>
<div>
<p>
<strong>
box
</strong>
</p>
</div>
</body>
<head>
<style>
* { color: blue; }
</style>
</head>
<body>
<div>
<p>
<strong>
box
</strong>
</p>
</div>
</body>
<head>
<style>
input[type=text] { color: blue; }
</style>
</head>
<body>
<div>
<input type="text">
</div>
</body>
예전 블로그에 기록했던 선택자들,,, https://blog.pongdang.today/pongstudy/css/threeselector