How to use section tag in html
Syntax
Syntax of HTML <section> tag
<section>.......</section>
<section>.......</section>
how to use section tag in html
Example
<!DOCTYPE html>
<html>
<head>
<title> html section tag</title>
</head>
<body>
<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>
<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,
</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>
- html is the root element of the html page.
- Every thing inside it is part of the webpage.
Step 3]
<head>
<title> HTML iframe tag </title>
</head>
- <head> section
- head section contains metadata about page. not visible on the page itself.
- <title> tag title section set the title of the page shows the browser tab.
Step 4]
<body>
<h1> HTML Section tag</h1>
<h2> What is the html tag</h2>
.
.
.
</body>
- <body> body contains the visible content webpage.
- html <h1> tag heading.
- html <h2> tag subheading tag.
Step 5]
<section>
<p>
An HTML tag is a building block of a web page used ....... </p>
</section>
- html <section> tag defines a section of related data content.
- inside section tag <p> tag for paragraph.
- section help organize content semantically.
Step 6]
<section>
<h3> Why learn html language </h3>
<p> HTML (HyperText Markup Language) is the ..... </p>
</section>
- html <h3> tag smaller heading <h2>.
- html <p> tag paragraph of text.
Step 7]
Closing tag
</section>
</body>
</html>
how to use section tag in html
