Design a Business Card - Design a Business Card

Tell us what’s happening:

What’s wrong with my code below? I can’t get past the background colour step., Step 4.

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

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Business Card</title>
  <link rel="stylesheet" href="styles.css">
  <style>
    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: yellow;
      padding: 20px;
      margin-top: 100px;
      text-align: center;
      font-size: 16px;
      margin-left: auto;
      margin-right: auto;
    }
  </style>
</head>
<body>
  <div class="business-card">
    <h1>Jane Doe</h1>
    <p>Web Developer</p>
    <p><a href="mailto:jane@example.com">jane@example.com</a></p>
  </div>
</body>
</html>
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36

Challenge Information:

Design a Business Card - Design a Business Card
https://www.freecodecamp.org/learn/full-stack-developer/lab-business-card/design-a-business-card

When I click the link in your post, and check step 4 it says this:

  1. All links on the page should not be underlined.

Is this the one you meant to ask about?

Also why do you put all your css inline in the index.html when you can place it in the styles.css file? (which is provided for you on the page?)

1 Like

Thank you very much. Got it.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.