OpenAI shocked the world with GPT-4o’s powers, its highly powerful vision interactions and natural language processing capabilities. We even found out how good it is in coding-related things, but can we say the same for Web development? Let’s find out how GPT-4o performs when we give it the task of creating a website!
We Asked GPT-4o to Create A Website
You might think that it is not so easy for an AI model to create a website from scratch, but it is not. Creating a website with GPT-4 involves using its capabilities to assist in the design and development process. All you have to do is keep the following things in mind:
- Establish the Goal of Your Website: Choose the topic of your website and create a layout for it that includes important areas like Home, About, Services, Portfolio, and Contact.
- Collect Content: To create text for your website, use GPT-4. For instance, you may ask it to produce a synopsis of your services or an “About Me” section.
- Selecting a Technology Stack: Choose between using an Angular, React, or Vue framework, or just basic HTML, CSS, and JavaScript.
- Create Your Development Environment: Create the environment by installing the required libraries and tools. All you may need for a basic HTML/CSS/JavaScript setup is a code editor such as VSCode.
- Create the HTML Structure: Build the basic structure of your website. An HTML section will contain the important parts of your website such as metadata, heading, body, sub-divisions, and much more.
- Style Your Website with CSS: Use CSS to style your website. Create a styles.css file and link it to your HTML. Try to provide as much depth as possible in your CSS file to make your website look more attractive.
- Add Interactivity with JavaScript: Enhance your website with JavaScript if needed. Create a script.js file and link it to your HTML. These JS functionalities will give a whole new feel to your website as you could never have imagined before.
- Test and Deploy: Make sure your website works properly and looks excellent by doing a local test. After you’re pleased, publish it using a hosting provider like Vercel, Netlify, or GitHub Pages.
- Iterate and Improve: Use feedback to improve your website continuously. You can use GPT-4 to generate additional content or code snippets.
Following these instructions, you can use GPT-4 to help create a comprehensive website. It can adhere to your commands and provide you with catchy website content.
We started with a Portfolio website
We tried OpenAI’s GPT-4o to make a portfolio website, using HTML, CSS, and Javascript. We wanted the design to be inspired by Bootstrap, and also include a few sections such as “My Details, My Education, and My Socials”. This is the initial prompt that I gave:
“Write HTML, CSS and JavaScript code for a portfolio website using Bootstrap design. Include functionalities like a menu bar consisting of my details, my education, my socials.”
This is how GPT-4o responded to our query with an HTML and CSS code:
Surprisingly there was no Javascript code here, even though I mentioned it. It simply said, “JavaScript: Currently, it’s empty but serves as a placeholder for any future interactivity you might want to add.”
I copy pasted the codes into VS Code and then used the Live Server extension to deploy the website, however, the resultant website was very boring to look at..
The Website looked very blank with a simple white background. The one good thing was that GPT-4o included the 3 sections that we asked for and even provided brackets where we could type out my content as we wished. However, the absence of a properly structured menu bar design and lack of intractability for no Javascript made us want to try again.
This time we wanted the design to be more specific, so we mentioned the background color and also decided to add some hover effects.
“I see the background here is plain white, can you add more of an attractive design, such as a black background with red hovers?”
GPT-4o responded well with an updated CSS and HTML file design:
When we ran the codes, we were quite satisfied with the website result. It reflected the changes that were needed, the subheadings were in red and the background was in black just as we needed. The menu bar on the top right also had the hover effect which we were looking for.
However, overall the whole design and the content organization wasn’t that impressive and looked quite simple to me. It basically had what I asked for, but lacked innovation and creativity that I expected from GPT-4o.
Asking GPT-4o To Make It Using A Reference
Since GPT-4o wasn’t that impressive at creating websites by itself, this time we gave a reference image to the chatbot and asked it to make a similar website to the one in the image below.
This is how GPT-4o responded.
Things were completely different this time, it felt as if ChatGPT had gone from a novice web designer to an expert. This time it took more than 5 minutes to generate both the HTML and CSS codes. Interestingly there was no Javascript code again here this time.
There was more depth in the HTML codes, it included a navbar with various lists and applied CSS to each of the sub-sections. When we copied the codes and deployed them on VS Code, we got this:
The website reflected everything that there was in the reference image, starting from all the details. GPT-4o did excellent in cloning the reference image website. It had only removed the person’s image and asked us to upload our image instead in the CSS section. Quite intelligent thinking from GPT-4o!
So, Is GPT-4o Good For Basic Web Development?
Based on the experiments we conducted, GPT-4o is better at providing website codes when you provide a detailed reference image showing what website you actually want.
We feel it’s still not creative and intelligent enough to make responsive and detailed websites by itself without highly specific instructions. If you query GPT-4o for a website without any reference, it will provide you with only a simple basic HTML and CSS code, that is good for a beginner level web-designer.
However, you can only provide reference ‘images’ for a website creation, don’t try providing YouTube links as GPT-4o is still getting up the levels to improve its reading from external links. It still has to do a lot of work in analyzing long YouTube video instructions to code and deploy a highly functional responsive website.
Conclusion
Just like all other AI tools out there, GPT-4o is also improving day by day! No matter how powerful the model is, it still has a long way to go before it can achieve human-level web development skills. But it can create some things for sure!