DEV Community

David Kanekanian
David Kanekanian

Posted on

1

E5 - Create Products Page

The products page shows customers the available products. For simplicity I will only list products by name.

1. Create an index.php page with html and body tags.

<html><body></body></html>
Enter fullscreen mode Exit fullscreen mode

2. Add a heading saying ‘Product Page’.

<h2>Product Page</h2>
Enter fullscreen mode Exit fullscreen mode

3. Add three products with a title and link to add it to the cart. The links won’t go anywhere yet.

<div> <span>Product #1</span> <a>Add to cart</a> </div>
Enter fullscreen mode Exit fullscreen mode

The final code:

<html><body>
    <h2>Product Page</h2>
    <div> <span>Product #1</span> <a>Add to cart</a> </div>
    <div> <span>Product #2</span> <a>Add to cart</a> </div>
    <div> <span>Product #3</span> <a>Add to cart</a> </div>
</body></html>
Enter fullscreen mode Exit fullscreen mode

Parent topic: Example 5

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay