ad

Saturday, December 6, 2025

how to use section tag in html

How to use section tag in html

web designing theory

Syntax 

 Syntax of HTML <section> tag

<section>.......</section>

how to use section tag in html
Example 


<!DOCTYPE html>
<html>
    <head>
        <title> html section tag</title>
    </head>
    <body>
      <h1> HTML Section tag</h1>
        <h2> What is the html tag</h2>
              <section>
            <p>
An HTML tag is a building block of a web page used to define
  elements and structure content in HTML (HyperText Markup Language).
  Tags are usually written within angle brackets, like tagname, and
  often come in pairs: an opening tag p and a closing tag /p,
  with the content placed in between. Some tags, like img or br,
  are self-closing and do not need a closing tag. HTML tags tell the
  browser how to display text, images, links, lists, tables, and other
  content. Learning tags is essential to create, format, and structure
  websites effectively </p>
        </section>

        <section>
            <h3> Why learn html language </h3>
            <p>HTML (HyperText Markup Language) is the foundation of the web,
                used to structure content on websites. Learning HTML is essential
                for creating web pages, adding headings, paragraphs, images, links,
                and other elements.beginner-friendly and easy to learn,
              making it the first step for anyone interested in web development.</p>
        </section>
       
    </body>
</html>

how to use section tag in html
Explain Program

Step  1] 

<!DOCTYPE html>

  • This declare the document type.
  • browser that the document is written in html

Step 2 ]

<html>.... . </html>

Step 3]

<head>
     
  <title> HTML iframe tag </title>
    </head>

 

    Step 4]

<body>

  <h1> HTML Section tag</h1>
        <h2> What is the html tag</h2>
.
.
.
</body>

Step 5]

 
<section>
            <p>
An HTML tag is a building block of a web page used ....... </p>

</section>

Step 6]

<section>
            <h3> Why learn html language </h3>
            <p> HTML (HyperText Markup Language) is the ..... </p>
</section>

Step 7]

   Closing tag  

   
</section>
</body>
</html>

how to use section tag in html

Output

how to use section tag in html










Related Post :-

how to use pre tag

html heading tag

how to use the image tag html