MY ARTICLES
Learning & Sharing
I share what I learn about web development, frontend technologies and responsive websites.
HTML Basics for Beginners
Learn the basic structure of HTML, tags and important elements.
Read ArticleJavaScript Variables & Data Types
Learn variables, let, const, strings, numbers and booleans.
Read ArticleJavaScript Arrays & Methods
Understand arrays and useful methods such as push, pop and shift.
Read ArticleHow I Build Responsive Websites
Learn the basic process of creating responsive websites.
Read ArticleHTML Basics for Beginners
HTML stands for HyperText Markup Language. It is used to create the structure of a webpage.
What is HTML?
HTML allows us to create headings, paragraphs, links, images, buttons and other elements on a webpage.
Basic HTML Structure
<!DOCTYPE html>
<html>
<head>
<title>My Website</title>
</head>
<body>
<h1>Hello World</h1>
<p>Welcome to my website.</p>
</body>
</html>
Back to Articles
CSS Flexbox Explained
Flexbox is a CSS layout system that makes it easier to arrange elements in rows and columns.
Basic Flexbox
.container {
display: flex;
justify-content: center;
align-items: center;
}
Important Properties
Some commonly used Flexbox properties are display, justify-content, align-items, flex-direction and gap.
Back to ArticlesCSS Grid vs Flexbox
CSS Grid and Flexbox are both powerful layout systems, but they are useful for different situations.
Flexbox
Flexbox is generally useful for one-dimensional layouts such as rows or columns.
Grid
CSS Grid is useful for two-dimensional layouts where both rows and columns need to be controlled.
.grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
}
Back to Articles
JavaScript Variables & Data Types
Variables are used to store data in JavaScript. The commonly used keywords are let, const and var.
Using let
let name = "Alishba";
let age = 20;
Using const
const country = "Pakistan";
Basic Data Types
JavaScript has data types such as String, Number, Boolean, Undefined, Null, BigInt and Symbol.
Back to ArticlesJavaScript Arrays & Methods
An array is used to store multiple values inside a single variable.
Creating an Array
let fruits = [
"Apple",
"Mango",
"Banana"
];
Useful Methods
fruits.push("Orange");
fruits.pop();
fruits.shift();
fruits.unshift("Grapes");
These methods allow us to add or remove elements from an array.
Back to ArticlesHow I Build Responsive Websites
A responsive website adjusts its layout and content according to the screen size of the device.
Mobile First Approach
I use flexible layouts, relative units, Flexbox, Grid and media queries to make websites responsive.
Media Query Example
@media (max-width: 768px) {
.container {
width: 100%;
}
}
This allows us to apply specific CSS rules when the screen becomes smaller.
Back to Articles