In: Computer Science
Provide a style rule to remove underlining from hypertext links marked with the <a> tag and nested within a navigation list.
nav > a {text-decoration: none;}
nav > a {text-decoration: no-underline;}
nav a {text-decoration: none;}
nav a {text-decoration: underline=“no”;}
If you want to give css in nested tags then you must write consecutive classname.
For example,
<ul>
<li> 1 </li>
</ul>
To give style in li element then, you can define that classname as ul li.
The descendant selector matches all elements that are descendants of a specified element. That is defined by space.
Now, here we have anchor tag as a descendants of nav tag so we can write it as nav a
'>'(child selector) will target elements which are direct children of a that element. Here we have nav > a. For this specific problem,
we have anchor tag as a direct child of nav element. so we cab write nav > a
To remove unerline from the anchor tag then we can use css property, text-decoration : none;
So, the answer will be :
nav a {text-decoration: none;}
nav > a {text-decoration: none;}
text-decoration has multiple values like underline, line-through, overline etc. You can use it as requirements.
text-decoration has values like no-underline or underline=“no” so, text-decoration: no-underline and text-decoration: underline=“no” can't possible as an answer. So other two options can't be an answer.