HTML Basics

HTML is the foundation of any website. It structures the content and tells browsers how to display text, links, images, and other elements. Learning HTML is the first step in web development.

Fun Facts


<h1>Welcome to My Website</h1>
<p>This is a paragraph in HTML</p>
CSS Styling

CSS (Cascading Style Sheets) controls how HTML elements appear on the page. With CSS, you can change colors, fonts, layout, and more.

There are different ways to include CSS: inline, internal, and external. Modern websites mostly use external stylesheets for maintainability.


h1 {
color: blue;
font-size: 2rem;
}
JavaScript Interactivity

JavaScript makes websites interactive. You can update content dynamically, validate forms, and respond to user actions like clicks.

It runs in the browser and is essential for building modern web apps, especially when combined with HTML and CSS.


document.querySelector('h1').addEventListener('click', () => {
alert('You clicked the heading!');
});
React Library

React is a JavaScript library for building user interfaces. It uses components—small, reusable pieces of UI—to build large applications efficiently.

React leverages JSX (JavaScript + XML) and manages app state through hooks like useState and useEffect. It's widely used for SPAs (Single Page Applications).


function App() {
const [count, setCount] = React.useState(0);
return (
<div>
<p>You clicked {count} times</p>
<button onClick={() => setCount(count + 1)}>Click Me</button> </div>
);
}
Tailwind CSS

Tailwind CSS is a utility-first framework that allows you to style your components directly in your HTML or JSX using pre-defined classes.

It eliminates the need to write custom CSS for most elements and is highly customizable via its config file. It's especially powerful when combined with React.


<pre class="bg-gray-900 text-green-300 p-2 rounded">
<code>npm install my-lib</code>
</pre>