Web Dev Lab

Module 1: HTML Formatting

What is HTML Formatting?

HTML contains several tags for defining text with a special meaning.

Legacy Tags & Colors

Older versions of HTML allowed direct styling without CSS using attributes:

Try It Yourself

Test Yourself

1. Which tag is used for the largest heading?

Module 2: Lists, Links & Images

HTML Lists

HTML allows web developers to group a set of related items in lists.

HTML Links and Images

Links are the defining feature of the web because they allow you to move from one page to another.

Try It Yourself

Test Yourself

1. Which attribute specifies an alternate text for an image?

Module 3: Tables & Layouts

HTML Tables

HTML tables allow web developers to arrange data into rows and columns.

Merging Cells

You can make a cell span across multiple rows or columns to create complex grid layouts:

Try It Yourself

Test Yourself

1. Which attribute spans a cell over multiple rows?

Module 4: Forms & User Input

HTML Forms

The <form> element is used to create an HTML form for user input. A form is a container for different types of input elements, such as text fields, checkboxes, radio buttons, submit buttons, etc.

Form Elements

Try It Yourself


Test Yourself

1. Which input type allows selecting multiple options?

Module 5: Frames Layout

What are Frames?

Frames allow a web browser window to be divided into separate segments, each of which can show a different HTML document. This was a common way to build navigation menus in the early days of the web.

Note: Because traditional framesets break out of modern web elements, the example below simulates frames safely using standard <iframe> tags and standard tables to demonstrate the exact same linking mechanics!

Try It Yourself

Test Yourself

1. What attribute connects an anchor tag's link to a specific frame?

Module 6: Mini Multi-Page Website

Requirement: Create a website of 6–7 pages with different effects as mentioned in the syllabus.

How to accomplish this

To create a connected multi-page website, you simply create multiple HTML files in the same folder on your computer and link them together using the anchor tag (<a href="filename.html">).

Your folder structure would look like this:

Module 7: JavaScript Practical Algorithms

JavaScript can interact with the user via popup boxes like alert() for output and prompt() for input. We also use for and while loops to repeat actions, and if/else conditionals to make decisions.


Task 1: Numbers 5 to 15 Table

Goal: Print a table of numbers from 5 to 15 along with their squares and cubes.

Concept: We use a for loop to iterate from 5 to 15. The \n character is used to create a new line in the alert box string.

Try It Yourself (Task 1)

Task 2: Largest of Three Numbers

Goal: Print the largest of three numbers provided by the user.

Concept: We use prompt() to get user input, and parseFloat() to convert that input text into a number. Then, we use if statements to check which number is the highest.

Try It Yourself (Task 2)

Task 3: Factorial of a Number (n!)

Goal: Find the factorial of a number n.

Concept: The factorial of a number (like 5!) is 5 x 4 x 3 x 2 x 1. We use a for loop to multiply a running total by each number up to n.

Try It Yourself (Task 3)

Task 4: Sum and Average

Goal: Enter a list of positive numbers terminated by Zero. Find the sum and average.

Concept: A while(true) loop runs infinitely until the user enters 0, at which point the break statement stops the loop. We keep track of the sum and the count of numbers entered to calculate the average.

Try It Yourself (Task 4)

Task 5: Compound Interest

Goal: Compute the amount in an account yielding 5% interest on Rs 1000 at the end of each year for n years.

Concept: The formula for compound interest is A = P(1 + r)^t. In JavaScript, exponents are calculated using Math.pow(base, exponent).

Try It Yourself (Task 5)

Task 6: Count Positives, Negatives, Zeros

Goal: Read n numbers. Count the number of negative numbers, positive numbers, and zeros.

Concept: We loop exactly n times. Inside the loop, we use an if / else if / else chain to check if the number is greater than 0, less than 0, or exactly 0, and increment the respective counter.

Try It Yourself (Task 6)

Test Yourself

1. Which method is used to ask the user for input?