Skip to main content

Overall Info

Explore. Learn. Stay Informed. admin@overallinfo.com
Follow Us:
Web Development

HTML and CSS for Beginners: Build Your First Webpage

Every website you have ever visited is built on two simple languages: HTML and CSS. HTML gives a page its structure — the headings, paragraphs, images, and links. CSS gives it its look — the colours, fonts, spacing, and layout. If you want to build websites, these two are where you start, and you can build your first real webpage within a day.

You do not need expensive software or a degree. A plain text editor and a web browser are enough.

What Is HTML?

HTML stands for HyperText Markup Language. It describes what things are on a page. You mark up content with tags: a heading goes in an h1 tag, a paragraph in a p tag, and a link in an a tag. The browser reads these tags and displays the content in the right form.

Think of HTML as the skeleton of a page. A basic document has a head section, which holds the page title and behind-the-scenes information, and a body section, which holds everything visitors actually see. Once you understand that shape, every webpage starts to look familiar, because they all follow it.

What Is CSS?

CSS stands for Cascading Style Sheets. If HTML is the skeleton, CSS is the skin and the styling. It controls how elements look: their colour, size, font, spacing, and position.

Without CSS, a webpage looks like a plain document — black text on a white background, everything in one column. With CSS, the same page can have a coloured header, a two-column layout, styled buttons, and a readable font. The HTML does not change; only the styling does.

CSS works by selecting elements and applying rules to them. You might write a rule that makes all headings dark blue, or one that sets the font size for paragraphs. While learning, you can write CSS inside the same HTML file; later, you will move it into a separate stylesheet, so one file can style hundreds of pages.

How HTML and CSS Work Together

The division of labour is simple and worth remembering. HTML is for meaning and structure. CSS is for presentation. Keeping them separate makes your pages easier to read, easier to change, and easier to fix.

When you want to change the look of a page, change the CSS, not the HTML. When you want to add content, add it in HTML and then style it in CSS. This is exactly how professional developers work.

Good structure also helps search engines and screen readers. A page with proper headings is easier for Google to understand and easier for a visually impaired visitor to navigate.

Your First Webpage, Step by Step

Step 1: Set Up Your Tools

Open a plain text editor, or download a free code editor such as Visual Studio Code, which highlights your code in colours and makes mistakes easier to spot. Create a folder for your project, and inside it create a file called index.html. That name matters: web servers look for a file called index.html first when someone visits a site.

Step 2: Write the Structure and Add Content

Type the skeleton of an HTML document into your file: the declaration, the head with a title, and the body. Inside the body, add a heading, a paragraph, and a link. Save the file and open it in your browser by double-clicking it. You have just built a webpage.

Now add a second heading, more paragraphs, an image, and a list — a bulleted list for points, or a numbered list for steps. Each time you add something, save and refresh the browser. Watching the page grow is the fastest way to learn what each tag does.

Step 3: Add Your First CSS

Add a style section to the head of your document. Write a rule that changes the colour of your headings, one that sets the font for the whole page, and one that gives paragraphs comfortable line spacing. Refresh the browser and watch the page transform.

Then try styling a link so it looks like a button: give it a background colour, white text, some padding, and rounded corners. This one exercise teaches you most of what CSS is about.

Step 4: Lay Out the Page

Give the body a maximum width and centre it on the page — this alone makes almost any page look far more professional. Then try a simple two-column layout for a section, using CSS Flexbox, the modern tool for arranging items in a row. Do not worry about perfection; the goal of your first page is to understand the building blocks.

Common Beginner Mistakes

  • Forgetting to close a tag. Every opening tag needs a closing tag. If your page looks strange, a missing closing tag is often the cause.
  • Styling in HTML instead of CSS. Keep styling in CSS, even when it feels quicker to add it directly to a tag.
  • Skipping headings. Using bold text instead of a real heading looks similar on screen, but it breaks the page structure for search engines and screen readers.
  • Trying to learn everything at once. Learn the common tags and properties first, and look up the rest when you need it.

Frequently Asked Questions

How long does it take to learn HTML and CSS?

You can build a basic page in a day and become comfortable with the fundamentals in a few weeks of regular practice. Real confidence comes from building several small projects, not from reading alone.

Do I need to know maths or programming first?

No. HTML and CSS are not programming in the usual sense, and they need no maths beyond simple numbers for sizes and spacing.

Can I get a job knowing only HTML and CSS?

On their own, they are usually not enough for a developer job, but they are the essential foundation. Employers expect HTML and CSS plus JavaScript, and often a framework.

Conclusion

HTML and CSS are the most approachable starting point in web development. HTML gives your page structure, CSS gives it style, and together they can build anything from a personal page to the front of a large website. Start with a single file, add one piece at a time, and refresh the browser often. Your first webpage does not need to be perfect — it needs to exist. Build it, then build another, and the skills will follow.