Skip to main content

Elements in HTML

Published 2 min readMarkdown

An HTML file is made of elements. These elements are responsible for creating web pages and define content in that webpage. An element in HTML usually consist of a start tag , close tag and content inserted between them. an element is a collection of start tag, attributes, end tag, content between them.

<html> :

The HTML element represents the root (top-level element) of an HTML document, so it is also referred to as the root element. All other elements must be descendants of this element.

<h1>, <h2>, <h3>, <h4>, <h5>, <h6> :

The h1 to h6 HTML elements represent six levels of section headings. h1 is the highest section level and h6 is the lowest.

<nav> :

The nav HTML element represents a section of a page whose purpose is to provide navigation links, either within the current document or to other documents.

<section> :

The section HTML element represents a generic standalone section of a document, which doesn't have a more specific semantic element to represent it. Sections should always have a heading, with very few exceptions.

<div>:

The div HTML element is the generic container for flow content. It has no effect on the content or layout until styled in some way using CSS.

<p> :

The p HTML element represents a paragraph.

<ul>:

The ul HTML element represents an unordered list of items, typically rendered as a bulleted list.

<li>:

The li HTML element is used to represent an item in a list. It must be contained in a parent element.

<audio>:

The audio HTML element is used to embed sound content in documents.

<img>:

The img HTML element embeds an image into the document.

<video>:

The video HTML element embeds a media player which supports video playback into the document.

<embed>:

The embed HTML element embeds external content at the specified point in the document.

<iframe>:

The iframe HTML element represents a nested browsing context, embedding another HTML page into the current one.

<td>:

The td HTML element defines a cell of a table that contains data. It participates in the table model.

<th>:

The th HTML element defines a cell as header of a group of table cells. The exact nature of this group is defined by the scope and headers attributes.

<tr>:

The tr HTML element defines a row of cells in a table. The row's cells can then be established using a mix of td (data cell) and th (header cell) elements.

No comments yet. Be the first to comment.