Build a Checkout Page - Build a Checkout Page

Tell us what’s happening:

  1. You should have a p element with an id of card-number-help immediately after the card number input.

Your code so far

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

<head>
    <meta charset="UTF-8" />
    <title>Checkout Page</title>
</head>

<body>
<h1>Checkout</h1>
<section>
<h2>Your Cart</h2>
<img src="https://cdn.freecodecamp.org/curriculum/labs/cube.jpg" alt="A 3 x 3 x 3 Rubik's Cube.">
    </section>
    <section>
<h2>Payment Information</h2>
<form>
<input required id="card-name" name="card-name" type="text"><label for="card-name"><span aria-hidden="true">*</span>Please Enter Your Name.</label>
<input required id="card-number" name="card-number" type="text" aria-describedby="card-number-help"><label for="card-number"><span aria-hidden="true">*</span>Please Enter Your Card Details.<p id="card-number-help"> dddhnjdnvhd</p></label>
    </form>
        </section>
</body>

</html>

Your browser information:

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

Challenge Information:

Build a Checkout Page - Build a Checkout Page

You should have a p element with a help text that explains the required card number format, placed immediately after the card number input.

Is your p element placed where the instructions indicate it should be placed?

it can’t fit on the same line though, even if i make it smaller.

Currently, your p element is nested inside your label element. That is incorrect syntax. Your p element should be between the input element and the label element.

2 Likes

sorry, im prone to forgetting about my posts. i did eventually reach this conclusion though, so thanks for your help