Anyone Can Make a Website — You’ve Been Lied To

👨‍💻 Code used in comments section.

Let’s create a minimalistic webpage using HTML and style it with Tailwind CSS – Get started on making your own websites.

The basic minimal HTML5 document is from here: https://www.sitepoint.com/a-minimal-html-document-html5-edition/

For that I have added Tailwind CSS to be fetched from external location – This enables us to use those class=”bg-purple-50″ and so on for styling.

This code defines a basic HTML5 webpage that uses Tailwind CSS for styling. The first line, !DOCTYPE html, declares that the document is written in HTML5. The html tag starts the page and includes the attribute lang=”en”, which specifies that the content is in English. Inside the head section, the meta charset=”utf-8″ tag sets the character encoding to UTF-8, ensuring that most characters and symbols display correctly. The title tag sets the text that appears in the browser tab as “My First Website.”

Next, the link tag imports the Tailwind CSS framework from an external CDN, allowing the page to use Tailwind’s utility classes for styling without needing to download or install it locally. The body tag contains the main content of the page and includes the class bg-purple-50, which applies a very light purple background color using Tailwind’s predefined color palette. Inside the body, there is a heading h1 that displays the word “Website.” This heading uses the Tailwind classes text-purple-600 to give the text a darker purple color and text-3xl to make the text extra large. When viewed in a browser, the page will show a light purple background with a large purple heading that says “Website.”

If you thought making websites is hard, you were wrong!

You May Also Like