What is HTML, CSS & JS


🟠 1. HTML – HyperText Markup Language


Definition:

HTML is the standard language used to create the structure of web pages. It tells the browser what content to show and how it's organized.

Key Points:

"HyperText" means linking between pages (like clicking a link).

"Markup Language" means it uses tags to describe elements (like <h1>, <p>, <img>).

HTML doesn’t style or animate — it only gives content structure and meaning.


Example:

<h1>Welcome to My Website</h1>

<p>This is my first paragraph.</p>

<img src="photo.jpg" alt="A photo">


Common Tags:

<h1> to <h6> – Headings

<p> – Paragraph

<a> – Link

<img> – Image

<div> – Container

<form> – Form

<button> – Button


🔵 2. CSS – Cascading Style Sheets


Definition:

CSS is used to style and design the HTML content. It controls how the website looks — like colors, spacing, fonts, layout, animations, and responsiveness.


Key Points:

CSS can be written inside HTML (internal), inline, or in a separate file (external).

"Cascading" means rules apply from top to bottom, and some can override others.

Helps make websites beautiful and user-friendly.


Example:


body {

  background-color: lightblue;

}

h1 {

  color: navy;

  font-family: Arial;

  text-align: center;

}



Common Properties:

color – Text color

background-color – Background color

font-size, font-family – Text styling

margin, padding – Spacing

border, box-shadow – Design elements

display, flex, grid – Layout controls


🟢 3. JavaScript (JS)


Definition:

JavaScript is a programming language used to make websites interactive and dynamic. It allows you to add logic, animations, handle user actions, and update content without reloading the page.


Key Points:

JS runs directly in the browser.

It works with HTML elements — like responding to button clicks, typing, scrolling, etc.

Used for everything from form validation to full web apps (like Google Docs, YouTube).


Example:


document.querySelector("button").onclick = function () {

  alert("You clicked the button!");

};


Common Uses:

Show/hide elements

Form validation (like checking email input)

Dynamic content updates

Image sliders

Pop-ups and alerts

Interactive animations

Real-time data (like clocks, weather, charts)



Summary:


Feature HTML CSS JavaScript

Role Structure Style/Design Interactivity/Logic

Language Type Markup Language Style Sheet Language Programming Language

File Extension .html .css .js

Example <h1>Hello</h1> h1 { color: red; } alert("Hi!");