Design a Business Card - Design a Business Card

Problem

In lesson Design a Business Card
my code can not pass this test:

  1. After the phone number p element, there should be an a element with the text Portfolio

I tried rewriting the code, checking for syntax errors, and reflesh the website, evev reset the lesson. I don’t know what’s wrong with it.

Code

html

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <title>Business Card</title>
    <link rel="stylesheet" href="styles.css"  />
</head>

<body>
    <div class="business-card">
        <a href="">test-link</a>
        <img class="profile-image" src="https://cdn.freecodecamp.org/curriculum/labs/flower.jpg" alt="profile-image" />
        <p class="full-name">Name</p>
        <p class="designation">Designation</p>
        <p class="company">Company Name</p>
        <hr/>
        <p>123.456@789.com</p>
        <p>987-654-321</p>
        <a href="https://portfolio.com">Portfolio</a>
        <hr/>
        <div class="social-media">
            <h2>Connect with me</h2>
            <a href="https://twitter.com">Twitter</a>
            <a href="https://linkedin.com">LinkedIn</a>
            <a href="https://github.com">GitHub</a>
        </div>
    </div>
</body>

</html>

css

body {
  background-color: rosybrown;
  font-family: Arial, sans-serif;
}

p {
  margin-top: 5px;
  margin-bottom: 5px;
}

a {
  text-decoration: none;
}

.business-card {
  width: 300px;
  background-color: rosybrown;
  padding: 20px;
  margin-top: 100px;
  text-align: center;
  font-size: 16px;
  margin-left: auto;
  margin-right: auto;
}

.profile-image {
  max-width: 100%;
}

were you asked to add this?

1 Like

I have no idea why I added this back then.
Well, after remove it, the test passed.
This anchor is indeed not within the testing requirements. But why it cause the problem?

because the tests are looking for an anchor element and are finding the wrong one