I often do not know which element to target when applying CSS? For example, I was coding a navigation bar today and I didn't know whether to target li or a to make the underline disappear. I had to watch a youtube tutorial on that....
CodePudding user response:
To disappear the underline, you need to target the 'a' tag. To style the list tag, you will target 'li'/'ul'. Always feel free to look up on the internet if you are stuck.
CodePudding user response:
The element that has an underline is the "a" tag. (and it is the one that changes the text's color to a blue-ish one)
Keep practicing HTML and CSS and this kind of information will come naturally.
For practice, click the F12 button on your keyboard or right click on the element you want and choose the "Inspect" option. You will see the styling of the element in code on the side of the browser.