Navigation design


#1

https://www.codecademy.com/courses/learn-navigation-design/projects/links-buttons-prj?action=resume_content_item

a {
cursor: default;
color: #2176FF;
text-decoration-line: none;
text-decoration: underline;
cursor: pointer;
}

By default, a element will be underlined, right? I have no idea here why we set it to text-decoration-line to none first and then set it to underline again.
But I tested with this html file, if I don’t set text-decoration to underline, it will not be underline. Why?


#2

This is because we need to override the defaults of the many ways of browsers of interpreting code. If we don’t add that, the defaults will override us, and not let us override them.