0% found this document useful (0 votes)
17 views2 pages

HTML Practical Paper With Line Numbers

The document provides examples of basic HTML structures and tags, demonstrating how to create a web page titled 'Sri Lanka' and format text using various HTML elements. It includes examples of paragraphs, line breaks, horizontal rules, text attributes like color and size, and multiple formatting styles such as bold, italic, and underline. Each section illustrates specific HTML functionalities, resulting in different visual outputs on a web page.

Uploaded by

nalinksbm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views2 pages

HTML Practical Paper With Line Numbers

The document provides examples of basic HTML structures and tags, demonstrating how to create a web page titled 'Sri Lanka' and format text using various HTML elements. It includes examples of paragraphs, line breaks, horizontal rules, text attributes like color and size, and multiple formatting styles such as bold, italic, and underline. Each section illustrates specific HTML functionalities, resulting in different visual outputs on a web page.

Uploaded by

nalinksbm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1.

Basic HTML Structure


01: <!DOCTYPE html>
02: <html>
03: <head>
04: <title>Sri Lanka</title>
05: </head>
06: <body>
07: </body>
08: </html>

Result: A blank web page titled 'Sri Lanka' appears in the browser tab.

2. HTML Tags (Paragraph, Line Break, Horizontal Rule)


01: <!DOCTYPE html>
02: <html>
03: <head>
04: <title>Sri Lanka</title>
05: </head>
06: <body>
07: <p>HTML tags (paragraph | line break | horizontal rule)</p>
08: <p>My country is Sri Lanka.</p>
09: <br>
10: <p>My country is Sri Lanka.</p>
11: <hr>
12: <p>My country is Sri Lanka.</p>
13: </body>
14: </html>

Result: Displays multiple paragraphs with line breaks and a horizontal line separating them.

3. Attributes and Values (Text Color, Size)


01: <!DOCTYPE html>
02: <html>
03: <head>
04: <title>Attribute and Values</title>
05: </head>
06: <body>
07: <p style="color:green;">Color is Green</p>
08: <p style="font-family:Arial; font-size:30px; color:red;">Font name - Arial /
Size 30 / Color - Red</p>
09: <p style="color:#0000FF;">Color RGB Code</p>
10: </body>
11: </html>

Result: Displays text in green, red with Arial font and size 30px, and blue using RGB code.

4. Multiple HTML Tags


01: <!DOCTYPE html>
02: <html>
03: <head>
04: <title>Multiple HTML Tags</title>
05: </head>
06: <body>
07: <h1 style="text-align:center;"><u><i>Wild Animals</i></u></h1>
08: </body>
09: </html>

Result: Displays a centered, underlined, and italicized heading: 'Wild Animals'.

5. HTML Text Formatting


01: <!DOCTYPE html>
02: <html>
03: <head>
04: <title>HTML Text Formatting</title>
05: </head>
06: <body>
07: <p><b>Bold Text</b></p>
08: <p><i>Italic Text</i></p>
09: <p><u>Underline Text</u></p>
10: <p><em>Emphasized Text</em></p>
11: <p><s>Strikethrough Text</s></p>
12: <p>10<sup>2</sup></p>
13: <p>H<sub>2</sub>O</p>
14: </body>
15: </html>

Result: Displays text with different formatting styles, including mathematical notations like 10² and H?O.

You might also like