Tutorials

KodeKite Tools

HTML
Flexbox
SVG
Canvas
HTML Tutorial

More


HTML Section Element
Section Element

Section is a HTML5 semantic element used to define a section in a document. It is a thematic of content, typically with headings, normally section element split page into sections.

Syntax

<section>content</section>


You can define one or more than one sections in a document.


Example

Heading 2

Paragraph


Practice Task

Open notepad or any other text editor, follow the following points.


  • Use <section> element to create 2 sections in a page
  • Inside section 1 create use <h3>- <p> elements with any text
  • Inside section 2 create use <h4>- <p> elements with any text
  • Use CSS to style section

save file with name task.html or task.htm and then open it using any browser and see results.


Solution

Section 1

Paragraph 1

Section 2

Paragraph 2