Design a Contact Form - Design a Contact Form

Tell us what’s happening:

Baffled by this one too. “19. Your labels should have a margin and font color.” any example I pull up online shows the same style of css code I have for labels. Not sure what else they can be looking for.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">

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

<body>

<div class="form-container">
    <form>
        <h2>Some Text</h2>
        <input type="text" id="text" name="text" required>
        </input>
        <label for="text">Text</label>
        <input type="email" id="email" name="email" required>
        </input>
        <label for="email">Email</label>
        <textarea id="textarea" name="textarea" required>
            </textarea>
            <label for="textarea">Text Area</label>
            <button type="submit">Submit</button>
        </form>
    </div>

</body>

</html>
/* file: styles.css */
.form-container {
  background-color: orange;
  border-radius: 20px;
  padding: 40px;
  width: 160px;
}

label[for=text], label[for=email], label[for=textarea] {
  font-color: purple;
}

input {
  width: 60px;
  padding: 40px;
  margin: 25px;
}

textarea {
  width: 60px;
  padding: 40px;
  margin: 25px;
}

button {
  background-color: cyan;
  font-size: 18px;
}

button:hover {
  background-color: gray;
}

Your browser information:

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

Challenge Information:

Design a Contact Form - Design a Contact Form

Hi,
You need to style all the label elements, so just use a label selector.
There is no such property as font-color in CSS. Just use color. You also need to add a margin to your label elements.

I know have :slight_smile: label {
text: blue;
margin: 20px;
}

and it does not pass still.

You’re getting there. text isn’t the property you are looking for. You’re changing the font color of the label elements so use the color property.

Thank you so much! I really appreciate it.