<a>
Tag normalize<a href=""></a>
<span></span>
<img src="" alt="">
display default값이 inline
속성 이다.
a
의 같은 경우, 초기에 속성 값을 노멀라이즈.
color
는 inherit
text-decoration
은 none
혹은 inherit으로 초기화를 시킨다.
a{
color : inherit; /* default 값이 black */
text-decoration : inherit; /* default 값이 underline */
}
Ex
<nav>
<section>
<div><a href="#">Home</a></div>
<div><a href="#">Tutorials</a></div>
<div><a href="#">Articles</a></div>
<div><a href="#">Inspiration</a></div>
</section>
</nav>
<head>
<style>
a {
text-decoration: inherit;
color: inherit;
}
/* 메뉴박스 */
nav {
text-align: center;
}
/* 메뉴 */
nav>section {
background: grey;
display: inline-block;
border-radius: 10px;
}
/* 메뉴 아이템 */
nav>section>div {
display: inline-block;
padding: 0 20px;
}
/* 메뉴 아이템 텍스트 */
nav>section>div>a {
padding: 20px;
display: block;
font-weight: bold;
letter-spacing: -1px;
}
nav>section>div:hover>a {
background-color: black;
color: white;
}
</style>
</head>