DEV Community

Cover image for How to Start Web Development as a Beginner πŸš€ β€” Part I (Frontend)
Mr Abdullah
Mr Abdullah

Posted on

How to Start Web Development as a Beginner πŸš€ β€” Part I (Frontend)

πŸ“– How to Start Frontend Web Development β€” A Beginner Friendly Guide (with Code Examples!) πŸš€

Hey everyone πŸ‘‹, If you’ve been thinking about learning web development but aren’t sure how to start, this guide is for you. I’ll not only explain what to learn β€” but also show you real code examples so you can practice right away.

So, let’s roll!

πŸ“Œ What is Web Development?
Web Development means creating websites or web applications that people can use through a browser like Chrome, Firefox, or Safari.

There are three major types:

1) Frontend Development: Frontend development focuses on the visual and interactive parts of a website or web application. It involves creating the layout, design, and user interface that users directly interact with. Common technologies used in frontend development include HTML, CSS, and JavaScript. Popular frameworks and libraries like React, Vue, and Next.js make building dynamic user interfaces easier. Frontend developers also ensure that websites are responsive, meaning they look good on all devices. Additionally, they work on optimizing website performance and enhancing user experience.

2) Backend Development: Backend development deals with the server-side logic and databases of a web application. It ensures that data flows smoothly between the server, database, and client-side interface. Backend developers typically work with languages like Node.js, Python, PHP, or Java. They are responsible for creating APIs, handling authentication, and managing server operations. Security, scalability, and performance are critical aspects of backend development. Backend developers also integrate third-party services and manage data storage systems like MongoDB, MySQL, or PostgreSQL.

3) Full-Stack Development: Full-stack development covers both frontend and backend tasks in a web project. A full-stack developer can build user interfaces, manage databases, and create server-side logic. This role requires knowledge of both client-side and server-side technologies, allowing developers to handle entire projects independently or within a team.

Before start web development you must know that is which web development stack you'll start . Because , there are many types of web development stacks. These are : ->

1️⃣ MERN Stack
The MERN stack includes MongoDB, Express.js, React.js, and Node.js. It’s a JavaScript-based full-stack solution perfect for building modern web apps. Developers love it for fast development, flexibility, and a huge open-source community.

2️⃣ MEAN Stack
MEAN consists of MongoDB, Express.js, Angular, and Node.js. It’s also JavaScript-based but uses Angular for a structured, component-based frontend. This stack is great for large, scalable, and enterprise-grade web applications.

3️⃣ LAMP Stack

The LAMP stack includes Linux, Apache, MySQL, and PHP. It’s one of the oldest and most reliable stacks for hosting dynamic websites and apps. LAMP is valued for its affordability, security, and wide hosting support.

4️⃣ JAM Stack

JAM stands for JavaScript, APIs, and Markup. It focuses on decoupling the frontend and backend, often using static site generators like Next.js, Gatsby, or Nuxt.js. It’s known for fast, secure, and scalable website development.

5️⃣ Django Stack

This stack uses Django (Python) as the backend, typically paired with PostgreSQL and frontend tools like HTML, CSS, and JavaScript. Django provides a high level of security, built-in features, and a rapid development workflow. It’s ideal for scalable and feature-rich web apps.

6️⃣ Ruby on Rails Stack

Ruby on Rails stack pairs Ruby on Rails with databases like PostgreSQL or MySQL, and standard frontend technologies. It prioritizes convention over configuration, simplifying development workflows. Popular with startups and MVP builders for its rapid prototyping capability.

7️⃣ PERN Stack

PERN combines PostgreSQL, Express.js, React.js, and Node.js. It’s like MERN but uses PostgreSQL, a powerful open-source relational database. Great for apps needing structured, relational data with _React’s _component-driven frontend.

8️⃣ Serverless Stack (SST)

This stack uses cloud services like AWS Lambda, API Gateway, DynamoDB, and frontend frameworks like React or Next.js. It eliminates server management and scales applications automatically. Best for lightweight, scalable, and cost-efficient apps.

9️⃣ Vue + Node Stack

This stack uses Vue.js for the frontend and Node.js with Express.js for the backend. Vue is known for its simplicity, flexibility, and gentle learning curve, making it beginner-friendly yet powerful. Combined with Node, it’s great for modern, fast, and interactive web apps.

In these I exampled to you some of web development stack. Now decision is yours's which stack you start a as a beginner . In my suggestion you'll try to start MERN stack web development . Because , it's easy to learn & high value in market .

Now , in this article I'll discuss to you MERN stack web development . MERN stack means basically M for MongoDB , E for Express.js , R for React.js _ , N for _Node.js . MERN stack is a fully furnished web development stack . Like React.js for frontend & Node.js, Express.js and also MongoDB for backend . In this article I'll focuses on Frontend.

πŸ“Œ The Core Frontend Technologies

Frontend web development is like the part of a car you can see, touch, and experience while driving.

*πŸ‘‰ HTML is like the car’s body structure *β€” it decides where the seats, steering, doors, and dashboard go, shaping the layout.

πŸ‘‰ CSS is the car’s paint, decoration, and style β€” it handles the color, design, rim style, dashboard look, and interior feel.

πŸ‘‰ JavaScript is the car’s engine and controls β€” when you press a button to turn on the headlights, honk the horn, or open a sunroof, JavaScript makes those dynamic actions happen.

πŸ‘‰ Responsive Design is like the adjustable seats and mirrors β€” it ensures your car feels good whether you’re driving in the city, highway, or off-road (meaning the website looks good on any screen size).

πŸ‘‰ The DOM (Document Object Model) is the car’s control panel β€” it lets you control the lights, AC, and music system anytime while driving, just like JavaScript can change HTML elements instantly.πŸ‘‰ Performance Optimization is like improving the car’s mileage, speed, and smoothness β€” making sure your website runs fast, uses fewer resources, and feels smooth to the user.

πŸ‘‰ Browser Compatibility is making sure the car can run on any kind of road β€” so your website looks and works properly on any browser like Chrome, Firefox, or Safari.

Let’s now talk about the core tools you need to start:


πŸ“ I. HTML β€” Structure of the Website
HTML (HyperText Markup Language) is the skeleton of every webpage. HTML is the standard language for creating webpages. It structures the content on a page using elements like headings, paragraphs, images, and links. Every website on the internet uses HTML as the foundation of its content.

βœ… Example:

<!DOCTYPE html> <html> <head> <title>My First Webpage</title> </head> <body> <h1>Welcome to My Website!</h1> <p>This is a simple paragraph explaining my page.</p> <img src="https://via.placeholder.com/150" alt="Sample Image"> <a href="https://www.google.com">Visit Google</a> </body> </html> 
Enter fullscreen mode Exit fullscreen mode

Explanation:

  • <!DOCTYPE html> declares this as an HTML5 document.
  • wraps the entire page.
  • contains meta info like the page title.
  • holds everything visible to the user: headings, paragraphs, images, and links.

know more about HTML : ->

1)HTML Tutorial

2) HTML Tutorial | GeeksforGeeks


🎨 II. CSS β€” Styling the Website
CSS (Cascading Style Sheets) controls how everything looks β€” colors, layouts, fonts, and responsiveness.CSS is used to style the appearance of HTML content. It controls how elements look on a page, including colors, fonts, layouts, and animations. With CSS, developers can create responsive and visually appealing websites.

βœ… Example:

<style> body { background-color: #f0f0f0; font-family: Arial, sans-serif; } h1 { color: #333; text-align: center; } p { padding: 10px; font-size: 18px; } </style> 
Enter fullscreen mode Exit fullscreen mode

Explanation:

  • body sets the background and font for the whole page.
  • h1 makes the heading color dark and centers it.
  • p adds space around the paragraph and increases its font size.

know more about CSS : ->

1)CSS Tutorial

2)CSS Tutorials - CSS: Cascading Style Sheets | MDN


βš™οΈ III. JavaScript β€” Making It Interactive

πŸ“Œ What is JavaScript (JS)?

JavaScript is a high-level, interpreted programming language mainly used to add interactivity and dynamic behavior to websites. Where HTML structures a page, and CSS styles it β€” JavaScript makes it alive. JavaScript is a powerful programming language used to add interactivity to websites. It allows developers to create dynamic features like sliders, popups, form validation, and animations. JavaScript can work on both the frontend (in browsers) and the backend (using tools like Node.js).

βœ… It can:

  • Show popup alerts
  • Handle form validation
  • Create animations
  • Control content without refreshing the page
  • And even work on servers now (thanks to Node.js)

βœ… Example:

<button onclick="sayHello()">Click Me!</button> <script> function sayHello() { alert("Hello, welcome to my website!"); } </script> 
Enter fullscreen mode Exit fullscreen mode

Explanation:

  • creates a clickable button.
  • onclick runs a function when clicked.
  • alert() shows a popup message

πŸ“Œ2 ways to See JavaScript Output:

1) On a Webpage (Browser Console)

You can write JavaScript in:
1)An HTML file using script tags
2)Or directly inside the browser console

πŸ“– Example: JS Inside HTML File:

 <!DOCTYPE html> <html> <head> <title>JS Output Example</title> </head> <body> <h1>Hello from HTML</h1> <script> console.log("Hello, this is JS in the browser console!"); alert("Hello User!"); document.write("This text is from JS inside HTML."); </script> </body> </html> 
Enter fullscreen mode Exit fullscreen mode

πŸ“Œ How to See Output:

  • Open this HTML file in any browser .
  • Press F12 or Ctrl + Shift + I (Inspect)
  • Go to Console Tab βœ… You’ll see:

Hello, this is JS in the browser console!

And an alert box will also appear.

2) Running JavaScript in CMD / PowerShell (Without Browser)

⚠️ Problem:

By default, browsers have JavaScript engines (like Chrome’s V8), but your computer’s CMD or PowerShell doesn’t understand JS directly.

βœ… Solution: Install Node.js

Node.js is a JavaScript runtime built on Chrome’s V8 engine. It allows you to run JavaScript code outside the browser β€” directly from your terminal.

πŸ“– How to Install Node.js

πŸ‘‰ Download and install from : Nodejs.org
πŸ‘‰ Open CMD or PowerShell πŸ‘‰ Type:

node -v

If installed properly, it’ll show you the version number. Like --> v20.16.0

πŸ“– Example: JS File in CMD / PowerShell

βœ… Create a file hello.js
console.log("Hello from Node.js!");

βœ… Run it in CMD / PowerShell:
node hello.js
Output:

Hello from Node.js!

πŸ“Œ Why We Need Node.js for JavaScript Outside Browser .?

πŸ‘‰ Browsers have built-in JavaScript engines (like V8 in Chrome) to run JS on web pages
πŸ‘‰ But command line and server environments don’t have this by default
πŸ‘‰ Node.js adds that runtime environment to your computer, so JS can run like other languages (Python, Java, C, etc.) directly from terminal

_know more JavaScript : _
1)JavaScript Tutorial
2)The Modern JavaScript Tutorial


IV. Responsive Design Basics ->
Nowadays, your website must look good on mobiles and tablets too. That’s where Media Queries and layout systems like Flexbox and Grid help.

βœ… Flexbox Example:

<style> .container { display: flex; justify-content: space-around; } .box { width: 100px; height: 100px; background-color: steelblue; color: white; text-align: center; line-height: 100px; } </style> <div class="container"> <div class="box">One</div> <div class="box">Two</div> <div class="box">Three</div> </div> 
Enter fullscreen mode Exit fullscreen mode

Explanation:

  • display: flex enables Flexbox.
  • justify-content: space-around distributes the boxes evenly.
  • Each .box is styled with color, size, and centered text.

βœ… Media Query Example:

@media (max-width: 600px) { .container { flex-direction: column; } } 
Enter fullscreen mode Exit fullscreen mode

Now on mobile screens, the boxes stack vertically instead of staying side-by-side.


V. Optional: Learn a CSS Framework
Once you’re comfortable with CSS, you can try frameworks like:

  • Tailwind CSS (utility-first, modern)
  • Bootstrap (classic, easy to start)

Example with Bootstrap:

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <button class="btn btn-primary">Click Me</button> 
Enter fullscreen mode Exit fullscreen mode

This renders a nicely styled blue button without writing custom CSS.

Tailwind CSS & Bootstrap docs: ->

1) Bootstrap Β· The most popular HTML, CSS, and JS library in the world.

2)Tailwind CSS - Rapidly build modern websites without ever leaving your HTML.


βš™οΈVI. Version Control: Git & GitHub

πŸ“Œ What is Git?

Git is a version control system (VCS) β€” it keeps track of all changes made to your project files over time.

βœ… With Git, you can:

  • Save multiple versions of your code (called commits)
  • Revert to any previous version if something breaks
  • Work on different features separately using branches
  • Merge those branches when features are ready
  • Collaborate with others without messing up each other's code
  • In short β€” Git is a time machine for your code.

πŸ“Œ What is GitHub?

GitHub is a cloud-based hosting service for Git repositories. Think of it as Facebook for your code β€” where:

  • You can store your Git-tracked projects online
  • Share your projects with others
  • Collaborate with developers worldwide
  • Manage open-source contributions
  • Showcase your work to recruiters or clients

  • βœ… Git is the tool.

  • βœ… GitHub is the online storage and collaboration platform built on top of it.

πŸ“Œ Why Do We Need Git & GitHub?

i) Track Changes : See exactly who changed what, when, and why
ii) Restore Old Versions : Go back to any earlier version if needed
iii) Branching : Try new ideas without affecting the main project
iv) Collaboration : Multiple developers can work on the same project easily
v) Backup & Portfolio : Keep your code safe online, accessible anytime, anywhere
vi) Deploy & Integrate : Host open-source projects, connect with CI/CD pipelines, deploy

Basic Git Commands:

git init # Start a new repository
git add . # Stage changes
git commit -m "Initial commit"
git remote add origin
git push -u origin main

know more about GIT & GITHUB : ->

1)Git Tutorial

2)GitHub Docs


βš›οΈVII. JavaScript Library: React.js
If you wanna to make more interactive your website, React is the more important for a website frontend more interactive after learn HTML, CSS, JS. So, ready to go knowing about React.js.

πŸ“Œ What is React?
React is a JavaScript library (not a framework) for building user interfaces (UIs), especially single-page applications (SPAs).

βœ… It makes websites super fast and interactive by using something called the virtual DOM, which updates only the necessary parts of a web page β€” not the whole page.

πŸ“Œ What is Vite? Why use it with React?

Vite is a next-generation front-end build tool that’s faster and lighter than Create React App (CRA).

Why Vite?

  • Instant dev server start
  • Fast hot module replacement (HMR)
  • Smaller final build
  • Simple and clean project structure

React + Vite = πŸš€ Modern React development with speed and simplicity.

πŸ“Œ How to Initialize a React Project with Vite

πŸ‘‰ Step 1️⃣ : Open your terminal (CMD / PowerShell)
πŸ‘‰ Step 2️⃣ : Run this command:

npm create vite@latest my-react-app -- --template react

Or with Yarn :

yarn create vite my-react-app --template react

πŸ‘‰ Step 3️⃣ : Go inside your project folder

cd my-react-app

πŸ‘‰ Step 4️⃣ : Install dependencies

npm install

πŸ‘‰ Step 5️⃣ : Start the development server

npm run dev

βœ… Your React site is now running locally at [http://localhost:5173/](http://localhost:5173/)

πŸ“Œ 2 Strong React Example (with Code)

πŸ“– Example 1: write Hello World in React.js

import React from 'react' function App() { return ( <div> <h1>Hello World</h1> <button>Click Me</button> </div> ) } export default App 
Enter fullscreen mode Exit fullscreen mode

πŸ“– Example 2: Simple Counter App
A classic React example using state.

import { useState } from 'react' function App() { const [count, setCount] = useState(0) return ( <div> <h1>Count: {count}</h1> <button onClick={() => setCount(count + 1)}>Increment</button> <button onClick={() => setCount(count - 1)}>Decrement</button> </div> ) } export default App 
Enter fullscreen mode Exit fullscreen mode

know more about React + Vite ->
1)Getting Started | Vite
2)Quick Start – React
3)React-Router


πŸ“Œ Final Thoughts
If you’ve read till here β€” thank you, you’re already ahead of most beginners out there. Starting your frontend web development journey isn’t about knowing everything at once. It’s about taking small, steady steps, building projects, and having fun along the way.

Frontend Web Development isn’t just about code β€” it’s about creating experiences for people. It can be tough at first, but with consistency, curiosity, and practice, you’ll master it.

So all of learner people, in this article I tried to discuss about of web development & share basics thought of frontend development. In my suggestion If you'll start web development step by step , I hope you'll learn web development smoothly .

*Start with small steps. Don’t chase all things at once. Learn. Build. Share. Repeat.
*

And that’s a wrap for Part I! But a website isn’t just what you see β€” there’s a whole world happening behind the scenes. In the next part, we’ll dive deep into Backend Development and explore how servers, databases, and APIs work together to power your web apps.

Stay tuned, it’s going to be exciting! πŸš€

Happy Coding πŸ’»πŸ’ͺ🏻

If you want to get updated about related . Please follow me :- Abdullah Shayed

Follow Me

Top comments (0)