Tutorials

KodeKite Tools

HTML
Flexbox
SVG
Canvas
HTML Tutorial

More


HTML Nested Elements
NESTED ELEMENTS

HTML elements can be nested in other elements means element inside an other element

Syntax

<Tag1><Tag2>Content</Tag2></Tag1>


Note:

You can put more than one element inside a single element.


Example

This is bold heading


In above example we nested two elements heading1 and bold


Practice Task

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


  • Select any three elements and nest or group them in one element
  • Select four other elements and nest them in one element
  • Use <br /> element for next or new line if neccessary

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


Solution

paragraph and

emphasized text are nested in heading 4

paragraph,

emphasized text and bold text are nested in heading 4