Logo
HTMLCSSJavaScriptReactjsnewContactUpdates

Get started today

HTMLCSSJavaScriptReactjsnewContactUpdates

Tools

Resume BuilderQR GeneratorVS Code Editor

Connect

GitHubWhatsApp Channel
tag
attributes

HTML Elements

By Saket Bhatnagar•August 2, 2025•Beginner to Intermediate

Table of Contents

  1. elements
  2. Types of Elements

elements

  1. 1HTML elements are the basic units of HTML.
  2. 2An HTML element consists of a opening tag, content, and an closing tag, and can also contain attributes that provide additional information about the element.
    Element = opening tag + content + closing tag.
  3. 4 For example, the following code creates an HTML element called "p" (which stands for "paragraph"), with the text "This is a paragraph." as its content:<p> This is a paragraph. </p>In this example <p> is the start tag, 'This is a paragraph.' is the content, and </p> is the end tag. The "p" element defines a paragraph of text.

Types of Elements

  1. Block Level Element

    • 1These elements will take complete width of the container.
    • 2Theses elements will always start from a new line.
    • 3We can set Height and Width for the block level elements.
    • 4Example: <p> tag, heading tags,<div> tag, etc.
  2. Inline Level Element

    • 1These elements will take space required by the content.
    • 2These elements will not start from a new line.
    • 3We cannot set Height and Width for the inline level elements.
    • 4Example: <img> tag, <b> tag,<span> tag, etc.

Share this article

Last updated: September 2, 2025

Join Our Community

Login to Join

© 2025 Saket Bhatnagar. All rights reserved.