ChatGPT-3.5 Code Website
Using ChatGPT-3.5 to Create a Website
Using ChatGPT-3.5 to create a website is like having a web developer at your side to help you.
ChatGPT can help you get started!
Write Down Your Idea
Before using Generative AI to help, you must figure out what you want the website to contain.
Some steps to consider:
- What is the website about?
- Do you want images?
- Do you need contact information?
The more details you provide, the better ChatGPT performs.
Generate Website Code
For our example, we will ask ChatGPT to create a simple webpage:
Example
With the following prompt:
Create a simple webpage with my cupcake business name, "Magically Delicious", a short description, a few images, and my contact details (Genevieve Lavorre, Email: lavorre@tmn.com)
A response from ChatGPT-3.5 could be:
Let's test the code: (We generated the 3 images with Midjourney)
Example
<!DOCTYPE html>
<html>
<head>
<title>Magically Delicious Cupcakes</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
}
h1 {
text-align: center;
}
.description {
text-align: center;
margin-bottom: 30px;
}
.contact-details {
text-align: center;
margin-top: 30px;
}
.contact-details p {
margin: 10px 0;
}
.image-gallery {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.image-gallery img {
width: 250px;
margin: 10px;
}
</style>
</head>
<body>
<h1>Welcome to Magically Delicious Cupcakes!</h1>
<div class="description">
<p>Indulge in the enchantment of our delectable cupcakes.</p>
<p>We offer a wide variety of flavors and designs to satisfy your sweet tooth and bring magic to your taste buds.</p>
</div>
<div class="image-gallery">
<img src="img_cupcake1.png" alt="Cupcake 1">
<img src="img_cupcake2.png" alt="Cupcake 2">
<img src="img_cupcake3.png" alt="Cupcake 3">
</div>
<div class="contact-details">
<p>Contact us for orders or inquiries:</p>
<p>Name: Genevieve Lavorre</p>
<p>Email: <a href="mailto:lavorre@tmn.com">lavorre@tmn.com</a></p>
</div>
</body>
</html>
Try it Yourself »
Looks pretty good!
Review the Code and Iterate
Going through the response from ChatGPT, it is a good starting point.
Let's ask for a little more help:
Example
With the following prompt:
Make the page look better
A response from ChatGPT-3.5 could be:
Let's test the code:
Example
<!DOCTYPE html>
<html>
<head>
<title>Magically Delicious Cupcakes</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
background-color: #f7f7f7;
}
h1 {
text-align: center;
color: #442d6c;
font-size: 36px;
margin-bottom: 30px;
}
.description {
text-align: center;
margin-bottom: 30px;
}
.description p {
font-size: 18px;
color: #555555;
line-height: 1.5;
margin-bottom: 10px;
}
.contact-details {
text-align: center;
margin-top: 30px;
}
.contact-details p {
font-size: 16px;
color: #555555;
margin: 5px 0;
}
.image-gallery {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.image-gallery img {
width: 300px;
margin: 10px;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
a {
color: #442d6c;
}
a:hover {
color: #800080;
}
</style>
</head>
<body>
<h1>Welcome to Magically Delicious Cupcakes!</h1>
<div class="description">
<p>Indulge in the enchantment of our delectable cupcakes.</p>
<p>We offer a wide variety of flavors and designs to satisfy your sweet tooth and bring magic to your taste buds.</p>
</div>
<div class="image-gallery">
<img src="img_cupcake1.png" alt="Cupcake 1">
<img src="img_cupcake2.png" alt="Cupcake 2">
<img src="img_cupcake3.png" alt="Cupcake 3">
</div>
<div class="contact-details">
<p>Contact us for orders or inquiries:</p>
<p>Name: Genevieve Lavorre</p>
<p>Email: <a href="mailto:lavorre@tmn.com">lavorre@tmn.com</a></p>
</div>
</body>
</html>
Try it Yourself »
That was a very simple page, but getting started quickly like this can save a ton of time.