HTML Introduction to HTML and CSS Make It Beautiful With CSS Adding a Style to several Elements using Class

adding a class to an anchor tag called social-links

Question: add a class called "social-links" to each anchor tag

<a href="#">Follow me on Twitter!</a> <a href="#">Send me an Email!</a>

index.html
<!doctype html>
<html>
  <head>
    <title>List Example</title>
    <link rel="stylesheet" href="styles.css">
  </head>
  <body>
    <a class="social links"</a>
    <a href="#">Follow me on Twitter!</a>
    <a href="#">Send me an Email!</a>

  </body>
</html>
styles.css

1 Answer

Martin Jones
Martin Jones
Front End Web Development Techdegree Graduate 41,065 Points

Close, you just need to add the class to the existing anchor tags like below:

<!doctype html>
<html>
  <head>
    <title>List Example</title>
    <link rel="stylesheet" href="styles.css">
  </head>
  <body>

    <a href="#" class="social-links">Follow me on Twitter!</a>
    <a href="#" class="social-links">Send me an Email!</a>

  </body>
</html>