Use of tags p, headings, bg-color and title - CSU953 - CSE 2026 - Shoolini University

2. Write a few lines with the use of tags p, heading, bg-color, and title.

This file will write a few lines with the use of tags.

title: This gives the name of the page in the tab of the browser.

heading: This is a headeing tag used to create headings. There is 6 types of it namely h1, h2, h3, h4, h5, h6.

p: This is a paragraph tag used to create paragraph.

details: The details tag specifies additional details that the user can open and close on demand.

bg-color: bg-color is an inline style property which can be used to provide background color the the tag described with.

Hierachy / Place of writing the tags in order:
  1. title is declared in the head of the html
  2. heading is decleared inside the body
  3. p is decleared inside the body
  4. bg-color is defined inline usder style property of the tag inside / in the body
  5. details is used to summarize a content under a dropdown carousal.

Code

                    
<!doctype html>
    <head>
        <title>CSU953 LAB 2 - CSE 2026</title>
    </head>
    <body>
        <h1>H1</h1>
        <h2>H2</h2>
        <h3>H3</h3>
        <h4>H4</h4>
        <h5>H5</h5>
        <h6>H6</h6>
        <p style="background-color:grey">This is a paragraph with background color grey</p>
        <details>
            <summary>This is the summary of the content</summary>
            <p>This is the details of the summary.</p>
        </details>
    </body>
</html>
                    
                

Output

H1

H2

H3

H4

H5
H6

This is a paragraph with background color grey

This is the summary of the content

This is the details of the summary.