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)