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

Marouane Fadili
Marouane Fadili
605 Points

Add a class called "social-links" to each anchor tag.

how can I do that?

1 Answer

Nils Kriedner
Nils Kriedner
Front End Web Development Techdegree Student 19,059 Points

Hi Marouane,

you can give a class to an element by just putting it in the opening tag of the element, like this:

<h1 class="main-heading>Heading Text</h1>

or with an achor tag

<a class="class-name" href="#">Link text</a>

Happy coding!

Nils

PS: You can upvote my post and/or mark as "best answer" (at the bottom of my post) if it helped you. :-)