what is the anchor tag again?
what is the anchor tag in HTML and how do i add a class to it?
<!doctype html> <html> <head> <title>List Example</title> <link rel="stylesheet" href="styles.css"> </head> <body> <li class="social-links" <a href="#">Follow me on Twitter!</a> <a href="#">Send me an Email!</a> </body> </html>
The anchor tag looks like <a>. Its an inline tag usually used for links. You can add a class to any opening tag by typing class="class-name" in between the brackets.
Anchor tags are the elements that you create to link to other pages or parts of pages. The base tag is
<a>, but you often see them with a couple of attributes as well:
<a href="http://www.google.com" title="Google!">Here's my link.</a>
Here's some more information on anchor tags: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a
You can add a class to an element by simply adding that attribute (
class="") to the anchor tag and putting your class name in between the quotes of the attribute (giving your attribute a value) in the same way you'd add a URL in the
Some additional information on classes: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class