CBSE 2026 results are out, Mukul scored a perfect 100/100 in Computer ScienceSee all toppers →

KwickAcademy Course Topics · 6 min · free

Inserting images, tables and hyperlinks

6 min1 KwickClipsFull text belowFree
Next lesson →Kajal Ma'am (MCA), teaching since 2004Remembered in this browser

Learn img with src and alt, broken image fixes, relative and absolute paths, table tags, colspan and rowspan, the a tag, kinds of links. img inserts an image, table with tr, th and td builds a table, and a with href makes a link.

Follows the syllabus of: GSEB Std 12 Computer Studies

On screen in this lesson

Why a broken image?

Wrong path or wrong folder
Spelling or capital letters differ
Wrong extension, like .jpeg for .jpg

Relative and absolute paths

Path typeExampleUse when
Same folderphoto.jpgfile is beside page
Sub folderimages/photo.jpginside a folder
Absolutehttps://...on another site

Table tags

TagMeansHolds
<table>the tableall rows
<tr>table rowcells
<th>table headingbold heading
<td>table dataone value

Useful table attributes

AttributeDoesExample
colspanjoins columnscolspan="2"
rowspanjoins rowsrowspan="3"
cellpaddingspace insidecellpadding="5"
cellspacingspace betweencellspacing="2"

Kinds of links

Kindhref valueOpens
Internalabout.htmlsame website
Externalhttps://...other website
Emailmailto:a@b.comemail app
Same page#feespart with id fees

In an HTML editor

Image button: location and alternate text
Table button: rows, columns, border
Link button: link text and address
Behind the buttons: img, table and a tags

Quick answers

Why does an image show a broken icon?

Wrong path, spelling or extension.

What does target="_blank" do?

Opens the link in a new tab.

KwickClips from this lesson

Short clips, one idea each. Good for revision the night before.

The full lesson, in text

Hello students, welcome to Kwickprep. A school website needs a photo of the campus, a timetable, and links to other pages. Why does an image sometimes show only a broken icon? Today we will insert images, tables and hyperlinks, and fix that common mistake.

We insert an image with the img tag. It is an empty tag, which means it has no closing tag. The src attribute gives the image file name, here school.jpg. The alt attribute gives text shown if the image cannot load, and screen readers read it aloud for blind users. Width and height set the size in pixels.

Pause and predict. The page shows a broken image icon instead of the photo. What went wrong? Usually the src path is wrong, or the file is in a different folder. The spelling and capital letters must match exactly, because School.jpg and school.jpg are different on a web server. The file extension must match too, like .jpg or .png.

The src value is a path, which tells the browser where the file is. A relative path starts from the current page's folder. If the image is inside an images folder, write images slash photo.jpg. An absolute path is the full web address, starting with https.

Now tables, like a class timetable. The table tag starts the table. Each tr tag is one table row. Each th tag is a heading cell, shown bold and centred. Each td tag is a normal data cell.

Here is a small timetable. The border attribute draws lines around the cells. The first row uses th for the headings Day and Subject. The next rows use td for Monday with Maths, and Tuesday with Science. So the browser shows a table of three rows and two columns.

A few attributes make tables neater. Colspan joins cells across columns, and rowspan joins cells down rows. Cellpadding gives space inside each cell. Cellspacing gives space between the cells. Newer pages set these with CSS, but many textbooks still teach these attributes.

Here the first row has one cell with colspan equals two. It stretches across both columns, like a title bar saying Class 12 Timetable. The next row has two normal cells. Pause and predict. How many th cells would the first row need without colspan? Two.

A hyperlink takes the user to another page when clicked. We make it with the a tag, called the anchor tag. The href attribute holds the address to open. The words between the tags are what the user sees and clicks. Here the user clicks Results, and the page results.html opens.

There are four common kinds of links. An internal link opens another page of the same website. An external link opens another website, and target underscore blank opens it in a new tab. A mailto link opens an email app with the address filled in. A link to a hash and an id jumps to a part of the same page.

We can put an image inside an anchor tag. Then clicking the image opens the link, like a logo that takes you to the home page. Here clicking logo.png opens index.html. The alt text Home helps users who cannot see the image.

Your textbook may use a visual web page editor, which writes these tags for you. The Image button asks for the image location and alternate text. The Table button asks for the number of rows and columns. The Link button asks for the link text and address. Behind every button, the editor still writes img, table and a tags.

Let us revise what we learned today. The img tag inserts an image, using src for the file and alt for text. A broken image usually means a wrong path, spelling or extension. Tables use table, tr, th and td, with colspan and rowspan to join cells. The a tag with href makes a link, and target underscore blank opens a new tab. An image inside an a tag becomes a clickable link.

Courses that teach this

CourseUnit
GSEB Std 12 Computer StudiesDesigning a Simple Website

Voice-over in this lesson is AI-generated. The script is written and checked by Kajal Ma'am. Boards can revise a syllabus mid-year, so confirm anything you plan around against the official board circular. Keep your passwords, OTPs and ID numbers to yourself — we never ask for them. To reach Kajal Ma'am, use the WhatsApp button; sharing your number there is how we call you back.

Free to watch, no sign-up. Live classes with Kajal Ma'am are the paid course; these lessons stay free either way.

Want a plan that actually fits your board dates?

Ask Kajal Ma'am directly, 20+ years teaching computer science. Free demo class first, no payment.

Talk to Kajal Ma'am on WhatsApp

Or see the Class 12 Computer Science course →

Studying outside India?

We coach CBSE, IGCSE & international students across the globe, one-to-one, in your local time zone.

Visit International →