Stage-8 Computer Science – Unit 9: Elementary
HTML
1. Introduction to HTML Formatting
HTML gives structure, layout, and design to your webpage. Using different tags, you can create lists,
tables, formatted text, and page margins.
2. Lists in HTML
A. Unordered List ()
Used when order does not matter. Uses bullets (•). Bullet types: disc, circle, square.
<UL type="circle">
<LI>Swimming
<LI>Reading
<LI>Playing Cricket
</UL>
B. Ordered List ()
Used when sequence matters. Default numbering: 1, 2, 3…
<OL type="A" start="3">
<LI>Swimming
<LI>Reading
<LI>Cricket
</OL>
C. Description List ()
<DL>
<DT>Abacus
<DD>A frame with beads used for counting.
</DL>
D. Nested List
<OL>
<LI>Science
<UL>
<LI>Physics
<LI>Chemistry
<LI>Biology
</UL>
</OL>
3. Tables in HTML
Tables display data in rows and columns.
<TABLE border="1" cellpadding="5" cellspacing="5">
<CAPTION>Student Details</CAPTION>
<TR>
<TH>Admission No.</TH>
<TH>Name</TH>
<TH>Marks</TH>
</TR>
<TR>
<TD>V10120</TD>
<TD>Eshana Singh</TD>
<TD>77</TD>
</TR>
</TABLE>
4. Empty Cells in a Table
<TD></TD>
OR
<TD> </TD>
5. Changing Text Font, Colour, and Size
<FONT size="5">Large Text</FONT>
<FONT color="red">Red Text</FONT>
<FONT face="Comic Sans MS">Comic Sans Text</FONT>
6. Setting Page Margins
<BODY leftmargin="20" topmargin="50" bgcolor="green">
7. Summary
1. <UL> creates bulleted lists. 2. <OL> creates numbered lists. 3. <DL> creates description lists. 4.
Tables use <TABLE>, <TR>, <TD>, <TH>. 5. <FONT> changes color, size, font. 6. Margins are set in
the <BODY> tag.
8. Practice Questions
1. Difference between ordered and unordered lists? 2. Explain nested lists. 3. Attributes of <TABLE>. 4.
Role of colspan and rowspan. 5. Write code to display blue, size 6, Comic Sans text. 6. How to insert
margins?
9. Mini Activities
• Create an unordered list of 5 hobbies. • Table with friends’ names and favourite food. • Description list
for 3 musical instruments.