HTML Tags for a Single Web Page – Grade 13 A/L ICT Notes 10.3

© 2026 schoolict.net (Ruwan Mangala Suraweera)

10.3 HTML Tags for a Single Web Pageතනි වෙබ් පිටුවක් සඳහා HTML ටැග්

Grade 13 A/L ICT · Lesson 1013 ශ්‍රේණිය A/L ICT · පාඩම 10

Prints all tabs in the language you are reading. Use “Save as PDF” in the print window to keep a copy.ඔබ කියවන භාෂාවෙන් සියලු tabs මුද්‍රණය වේ. පිටපතක් තියාගන්න print window එකේ “Save as PDF” තෝරන්න.
🎬Video coming soon in this language. Switch language to watch the other video.මේ භාෂාවෙන් වීඩියෝව ඉක්මනින් එනවා. අනෙක් වීඩියෝව බලන්න භාෂාව මාරු කරන්න.

In this videoමේ වීඩියෝවේ

  • A page has html, head and body sections.පිටුවට html, head, body ඇත.
  • title appears in the browser tab.title tab එකේ පෙනේ.
  • h1–h6, p, br format text.h1–h6, p, br පෙළ හැඩගන්වයි.
  • b, i, u and font style words.b, i, u, font වචන හැඩගන්වයි.
  • Comments are not displayed.comments නොපෙන්වයි.
HTMLTagElementAttributeHead sectionBody sectionTitle

Notesසටහන්

Syllabus 10.3. HTML describes a page with tags written in angle brackets. Every page has a page definition…, a head section with the , and a <strong>body section</strong> <body> with the visible content. Inside the body you format text with <h1>–<h6>, <p>, <br/>, <b>, <i>, <u> and <font>, set a <strong>background colour</strong> and add <strong>comments</strong>.</span><span class="sn-si" lang="si"><strong>විෂය නිර්දේශය 10.3.</strong> <strong>HTML</strong> කෝණ වරහන් තුළ ලියන <strong>ටැග්</strong> මගින් පිටුවක් විස්තර කරයි. සෑම පිටුවකම <strong>පිටු නිර්වචනය</strong> <html>…</html>, <title> සහිත <strong>head කොටස</strong> <head> සහ දෘශ්‍ය අන්තර්ගතය සහිත <strong>body කොටස</strong> <body> ඇත. body තුළ <h1>–<h6>, <p>, <br/>, <b>, <i>, <u> සහ <font> මගින් පෙළ හැඩගන්වා, <strong>පසුබිම් වර්ණය</strong> සකසා <strong>comments</strong> එක් කරයි.</span></p><h4 class="sn-h"><span class="sn-en" lang="en">1. Structure of a page</span><span class="sn-si" lang="si">1. පිටුවක ව්‍යුහය</span></h4><figure class="sn-fig"><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 560 220" role="img" aria-label="HTML document tree with head and body" style="max-width:100%;height:auto"><rect width="560" height="220" fill="#f8fafc"/><defs><marker id="ar7n3" markerwidth="8" markerheight="8" refx="7" refy="3" orient="auto"><path d="M0,0 L7,3 L0,6 Z" fill="#475569"/></marker></defs><text x="10" y="18" font-size="12" fill="#0b1d3f">Structure of an HTML document</text><rect x="200" y="30" width="160" height="30" rx="6" fill="#ede9fe" stroke="#6d28d9"/><text x="280" y="48.9" text-anchor="middle" font-size="11" fill="#0b1d3f"><html></text><rect x="60" y="95" width="160" height="30" rx="6" fill="#dbeafe" stroke="#1d4ed8"/><text x="140" y="113.8" text-anchor="middle" font-size="11" fill="#0b1d3f"><head></text><rect x="340" y="95" width="160" height="30" rx="6" fill="#dcfce7" stroke="#15803d"/><text x="420" y="113.8" text-anchor="middle" font-size="11" fill="#0b1d3f"><body></text><line x1="280" y1="60" x2="140" y2="95" stroke="#475569"/><line x1="280" y1="60" x2="420" y2="95" stroke="#475569"/><rect x="60" y="160" width="160" height="30" rx="6" fill="#dbeafe" stroke="#1d4ed8"/><text x="140" y="178.5" text-anchor="middle" font-size="10" fill="#0b1d3f"><title> · <style> · <link></text><rect x="340" y="160" width="160" height="30" rx="6" fill="#dcfce7" stroke="#15803d"/><text x="420" y="178.5" text-anchor="middle" font-size="10" fill="#0b1d3f"><h1> <p> <a> <img> <table></text><line x1="140" y1="125" x2="140" y2="160" stroke="#475569"/><line x1="420" y1="125" x2="420" y2="160" stroke="#475569"/><text x="20" y="210" font-size="11" fill="#334155">head = information about the page (not shown) · body = content shown in the browser</text></svg><figcaption class="sn-p sn-mute"><span class="sn-en" lang="en">The html, head and body sections</span><span class="sn-si" lang="si">html, head සහ body කොටස්</span></figcaption></figure><div class="sn-hx" data-sn-hx="page"><div class="sn-code-t">🌐 HTML: <span class="sn-en" lang="en">A single web page</span><span class="sn-si" lang="si">තනි වෙබ් පිටුවක්</span></div><pre class="sn-pre"><span class="sn-xc"><!DOCTYPE html></span> <span class="sn-xt"><html</span><span class="sn-xt">></span> <span class="sn-xt"><head</span><span class="sn-xt">></span> <span class="sn-xt"><title</span><span class="sn-xt">></span>My First Page<span class="sn-xt"></title</span><span class="sn-xt">></span> <span class="sn-xt"></head</span><span class="sn-xt">></span> <span class="sn-xt"><body</span> <span class="sn-xa">bgcolor</span>=<span class="sn-xv">"lightyellow"</span><span class="sn-xt">></span> <span class="sn-xc"><!-- This is a comment: the browser does not show it --></span> <span class="sn-xt"><h1</span><span class="sn-xt">></span>Sri Lanka<span class="sn-xt"></h1</span><span class="sn-xt">></span> <span class="sn-xt"><h3</span><span class="sn-xt">></span>The pearl of the Indian Ocean<span class="sn-xt"></h3</span><span class="sn-xt">></span> <span class="sn-xt"><p</span><span class="sn-xt">></span>Sri Lanka is an <span class="sn-xt"><b</span><span class="sn-xt">></span>island<span class="sn-xt"></b</span><span class="sn-xt">></span> with <span class="sn-xt"><i</span><span class="sn-xt">></span>beautiful<span class="sn-xt"></i</span><span class="sn-xt">></span> beaches.<span class="sn-xt"><br</span><span class="sn-xt">/></span> Capital: <span class="sn-xt"><u</span><span class="sn-xt">></span>Sri Jayawardenepura Kotte<span class="sn-xt"></u</span><span class="sn-xt">></span><span class="sn-xt"></p</span><span class="sn-xt">></span> <span class="sn-xt"><p</span><span class="sn-xt">></span><span class="sn-xt"><font</span> <span class="sn-xa">size</span>=<span class="sn-xv">"5"</span> <span class="sn-xa">color</span>=<span class="sn-xv">"blue"</span><span class="sn-xt">></span>Big blue text<span class="sn-xt"></font</span><span class="sn-xt">></span><span class="sn-xt"></p</span><span class="sn-xt">></span> <span class="sn-xt"></body</span><span class="sn-xt">></span> <span class="sn-xt"></html</span><span class="sn-xt">></span></pre><p class="sn-hx-r">▶ <span class="sn-en" lang="en">Result in the browser</span><span class="sn-si" lang="si">බ්‍රව්සරයේ ප්‍රතිඵලය</span></p><iframe class="sn-hx-f" title="Preview: A single web page" sandbox="" loading="lazy" style="height:250px" srcdoc="<!DOCTYPE html> <html> <head> <title>My First Page

Sri Lanka

The pearl of the Indian Ocean

Sri Lanka is an island with beautiful beaches.
Capital: Sri Jayawardenepura Kotte

Big blue text

">
TagටැගයMeaningඅර්ථය
… …Starts and ends the pageපිටුව ආරම්භ කර අවසන් කරයි
… …Information about the page (not shown)පිටුව ගැන තොරතුරු (නොපෙන්වයි)
… … Text in the browser tabබ්‍රව්සර් tab එකේ පෙළ
Visible content; background colourදෘශ්‍ය අන්තර්ගතය; පසුබිම් වර්ණය

…

…

Headings: h1 largest, h6 smallestශීර්ෂ: h1 විශාලතම, h6 කුඩාතම

…

…

Paragraphඡේදය


Line break – an empty tag with no end tagපේළි කැඩීම – අවසාන ටැගයක් නැති හිස් ටැගය
Bold, italic, underlineතද, ඇල, යටි ඉර
Text size (default 3) and colourපෙළ ප්‍රමාණය (පෙරනිමි 3) සහ වර්ණය
Comment – not displayedComment – නොපෙන්වයි
🧮 Worked exampleවිසඳූ උදාහරණය Why does the comment not appear in the preview, and which heading is bigger?comment එක preview එකේ නොපෙනෙන්නේ ඇයි, විශාල ශීර්ෂය කුමක්ද?
Text between is a comment for the programmer, so the browser ignores it.

“Sri Lanka” is larger than

, because h1 is the top-level heading. අතර පෙළ ක්‍රමලේඛකයාට comment එකකි; බ්‍රව්සරය නොසලකයි. h1 ඉහළම මට්ටමේ නිසා

විශාලයි.

  • Tags usually come in pairs: a start tag

    and an end tag

    .
    ටැග් සාමාන්‍යයෙන් යුගල ලෙස: ආරම්භක

    සහ අවසාන

    .
  • Attributes give extra information inside the start tag: name="value", e.g. bgcolor="lightyellow".ගුණාංග ආරම්භක ටැගය තුළ අමතර තොරතුරු දෙයි: name="value".
  • Save the file with the extension .html or .htm and open it in a browser.ගොනුව .html හෝ .htm දිගුවෙන් සුරකින්න.
  • and bgcolor are in the syllabus but are old; HTML5 pages use CSS for colours and fonts (Lesson 10.5). සහ bgcolor විෂය නිර්දේශයේ ඇති නමුත් පැරණිය; HTML5 CSS භාවිත කරයි (10.5).
💡 Indent nested tags and close every tag you open – it makes errors easy to spot.කූඩු ටැග් indent කර විවෘත කළ සෑම ටැගයක්ම වසන්න.
🚀 Beyond the syllabus (2026 update)🚀 විෂය නිර්දේශයෙන් ඔබ්බට (2026 යාවත්කාලීනය) Not required for the exam – read for interest.විභාගයට අවශ්‍ය නැත – දැනුම සඳහා කියවන්න. HTML5 semantic tags such as
,

Key Wordsප්‍රධාන පද

HTMLHTML
HyperText Markup Language used to build web pages.වෙබ් පිටු සෑදීමට භාවිත HyperText Markup Language.
Tagටැගය
Keyword in angle brackets such as

.

වැනි කෝණ වරහන් තුළ මූල පදය.

Elementමූලද්‍රව්‍යය
Start tag, content and end tag together.ආරම්භක ටැගය, අන්තර්ගතය සහ අවසාන ටැගය එකට.
Attributeගුණාංගය
Extra setting inside a start tag as name="value".ආරම්භක ටැගය තුළ name="value" ලෙස අමතර සැකසුම.
Head sectionHead කොටස
Part holding page information such as the title.title වැනි පිටු තොරතුරු රඳවන කොටස.
Body sectionBody කොටස
Part holding the visible content.දෘශ්‍ය අන්තර්ගතය රඳවන කොටස.
Titleමාතෘකාව
Text shown in the browser tab.බ්‍රව්සර් tab එකේ පෙන්වන පෙළ.
Heading tagශීර්ෂ ටැගය
h1 to h6 headings with h1 the largest.h1 විශාලතම වන h1–h6 ශීර්ෂ.
Paragraphඡේදය
Block of text in p tags.p ටැග් තුළ පෙළ කොටස.
Line breakපේළි කැඩීම
br tag that starts a new line.නව පේළියක් ආරම්භ කරන br ටැගය.
Empty tagහිස් ටැගය
Tag with no end tag such as br.br වැනි අවසාන ටැගයක් නැති ටැගය.
CommentComment
Note between that is not displayed. අතර නොපෙන්වන සටහන.

Sample Q&Aආදර්ශ ප්‍රශ්න සහ පිළිතුරු

1Three sections of every HTML page?කොටස් තුන?

Answerපිළිතුර: Page definition html, head and body.html, head, body.

2Where is the title shown?title පෙන්වන්නේ කොහේද?

Answerපිළිතුර: In the browser tab.බ්‍රව්සර් tab එකේ.

3Largest heading tag?විශාලතම ශීර්ෂය?

Answerපිළිතුර: h1.h1.

4Why is br an empty tag?br හිස් ටැගයක් ඇයි?

Answerපිළිතුර: It has no content and no end tag.අන්තර්ගතයක් හෝ අවසාන ටැගයක් නැත.

5How do you write a comment?comment ලියන්නේ?

Answerපිළිතුර: Between . අතර.

6Default font size?පෙරනිමි font size?

Answerපිළිතුර: 3 (range 1–7).3.

MCQබහුවරණ ප්‍රශ්න

Choose the correct answer for each question.සෑම ප්‍රශ්නයකටම නිවැරදි පිළිතුර තෝරන්න.

Scoreලකුණු: 0 / 20

1The text in the browser tab is set bytab