@12Kentos
Posted
Code looks pretty good to me! I don't think the underline property was actually needed here. One thing I did notice is you used <a> to change the properties of your link. Granted this was the only link in your html, but if you were to want to use a link somewhere in the future, this would affect all of your links. Where possible it is generally better to use a class to select and change features like this. Hope that makes sense!
Marked as helpful
@tbrownlee
Posted
@12Kentos thanks for your advice! I'll get rid of the underline property.
You're right, I got lazy on the <a> element. In this scenario, which is better:
-Put a div to wrap the link with a class of, say, "link" and then do .link a {} in css?
-Or should I put a class directly in the <a> element?
@12Kentos
Posted
@tbrownlee I think that comes down to personal preference, personally I would put it in the <a> element itself, as you are likely to have other links on a webpage that you would like styled in the same manner.
This makes your code more reusable, and in my opinion easier to maintain.
Marked as helpful
@tbrownlee
Posted
@12Kentos ok makes sense! I fixed my code. Thanks again.