Page 89 - ConceptGP_C7_Fb
P. 89
The syntax for using the list-style-type property is: <UL Style = "list-style-type:value">
Write HTML code to create a list by using properties of CSS.
<!DOCTYPE html>
<HTML>
<HEAD> <TITLE> List</TITLE></HEAD>
<BODY>
<H2>Types of Pollution:</H2>
<UL style="list-style-type:square">
<LI>Air Pollution</LI>
<LI>Water Pollution</LI>
<LI>Noise Pollution</LI>
<LI>Soil Pollution</LI>
</UL>
</BODY>
</HTML>
Subject: Create a line break
To create a line break, we can use <LI> tag which automatically creates a line break. We
can also put paragraph, line breaks, images, links, other lists, etc. within the list.
TABLES
Tables are used in HTML to display data in a tabular format. Presenting information in a tabular
form makes it easy to understand. To create a table in HTML, we use five basic tags:
1. <TABLE> tag: The table defined with this tag. All other tags are enclosed within the <TABLE> tag.
2. <TR> tag: This tag defines a row of cells, where TR stands for Table Row.
3. <TD> tag: This tag defines the data cell, where TD stands for Table Data.
4. <TH> tag: This tag defines the heading of each column or row, where TH stands for Table
Header. The heading is displayed as bold-faced and centre-aligned in all browsers by default.
5. <CAPTION> tag: This tag defines the heading of the table. By default, the table caption is
centre-aligned.
Write HTML codes to show the student's details in a table.
<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE>A Simple Table Structure</TITLE></HEAD>
Lists and Tables in HTML5 87

