HTML CSS JS
HTML CSS JS
1. Overview of HTML
HTML (HyperText Markup Language) is the foundation of web pages.
It structures content using tags like <p> , <h1> , <img> , etc.
Web browsers read HTML to display elements on the page.
It consists of elements, attributes, and nesting rules.
HTML5 introduced semantic tags like <header> , <article> , <section> .
Forms allow user input with <input> , <textarea> , and <button> .
🔹 Example:
<!DOCTYPE html>
<html>
<head><title>My Webpage</title></head>
<body><h1>Welcome to HTML</h1></body>
</html>
2. Overview of CSS
CSS (Cascading Style Sheets) styles HTML elements.
It controls layout, colors, fonts, and spacing of web pages.
There are three types of CSS: Inline, Internal, and External.
CSS3 introduced animations, flexbox, grid, and media queries.
CSS follows the Box Model: Margin, Border, Padding, and Content.
🔹 Example: Changing text color using CSS
4. Overview of JavaScript
JavaScript adds interactivity and logic to web pages.
It runs in the browser and interacts with HTML & CSS.
It can handle events, animations, and DOM manipulations.
Supports variables, loops, functions, and object-oriented programming.
JS is used for both frontend and backend (Node.js).
🔹 Example: Displaying an alert
alert("Hello, JavaScript!");
<form>
<input type="text" placeholder="Enter Name">
<button>Submit</button>
</form>
7. Build a Website
A website consists of HTML (structure), CSS (design), and JavaScript (functionality).
Frameworks like Bootstrap make web development faster.
Websites can be static or dynamic (connected to a backend).
8. Responsive Design
Responsive design ensures a website adapts to different screen sizes.
Uses CSS media queries to adjust styles for devices.
🔹 Example:
<p id="demo">Hello</p>
<script>
document.getElementById("demo").innerHTML = "Hello, JavaScript!";
</script>