CSS默认样式
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>默认样式</title>
<style>
#d1{
font-size: 200px;
color: turquoise;
}
</style>
</head>
<body>
<div id="d1">
<a href="https://www.bilibili.com/">去B站</a>
<span>你好啊</span>
</div>
</body>
</html>
优先级:
元素的默认样式
>
继承的样式
,所以如果要重置元素的默认样式,选择器一定要直接选择器
到该元素。
元素一般都些默认的样式,例如:1. <a> 元素:下划线、字体颜色、鼠标小手。2. <h1> ~ <h6> 元素: 文字加粗、文字大小、上下外边距。3. <p> 元素:上下外边距4. <ul> 、 ol 元素:左内边距5. body 元素: 8px 外边距( 4 个方向)