In the index.html
file, each <span>
element has a margin-left
property.
But in this case, the style will be added to the first element as well.
We need to fix this. Move the margin-left
property to another selector.
Don’t use identifiers, classes and inline styles - only related combinators.
This task is part of the Full-Stack JavaScript Course
If you have any issues with it, you can ask for community help below the post
Feel free to help others if you’ve already solved the task
index.html
<!DOCTYPE html>
<html>
<head>
<title>Tags</title>
<style>
h2 {
font-family: monospace;
margin-bottom: 10px;
}
span {
color: white;
padding: 5px 10px;
font-family: monospace;
font-size: 16px;
border-radius: 4px;
background-color: #3F3084;
margin-left: 10px;
}
</style>
</head>
<body>
<h2>Tags</h2>
<div>
<span>React</span>
<span>React Native</span>
<span>HTML</span>
<span>CSS</span>
<span>JS</span>
<span>styled-components</span>
<span>Node.js</span>
</div>
</body>
</html>