block level element

 



What are Block-level Elements?

  • Block-level elements are those that start on a new line and take up the entire width of their container by default. 
  • They essentially claim all the horizontal space for themselves, pushing any content that comes after them to a new line.

Characteristics of Block-level Elements:

  • Always start on a new line.

  • Take up the full width available.

  • Width and height can be controlled via CSS.

  • Can contain other block-level as well as inline elements.

Common Block-level Elements:

  • <h1>,<h2>,<h3>,<h4>,<h5>,<h6> - Headings
  • <p> - Paragraphs
  • <hr> - Horizontal rule
  • <address> - Address information
  • <article> - Article content
  • <aside> - Sidebar content
  • <blockquote> - Block quotations
  • <canvas> - Drawing area
  • <dd> - Description in a description list
  • <div> - Generic container
  • <dl> - Description list
  • <dt> - Term in a description list
  • <fieldset> - Group of related form elements
  • <figcaption> - Caption for a figure
  • <figure> - Image or media with a caption
  • <footer> - Footer of a section or page
  • <form> - HTML form
  • <header> - Header of a section or page
  • <li> - List item
  • <main> - Main content of a document
  • <nav> - Navigation links
  • <noscript> - Alternate content when JavaScript is not enabled
  • <ol> - Ordered list
  • <ul> - Unordered list
  • <pre> - Preformatted text
  • <section> - Standalone section in a document
  • <table> - Table
  • <video> - Video content

Related Posts:

  • HTML Page Structure Understanding the Structure of an HTML Document <!DOCTYPE html> // let browser know it's an HTML5 Document.<html> // Root of an… Read More
  • Paragraph Horizontal and Line Break Tags The <p> tag defines a paragraph.Browsers automatically add a single blank line before and after each.<p>This is a paragraph.</p&g… Read More
  • HTML Comments it is used to understand the code written by someone.the browser will ignore the comments Types of Comments in HTMLSingle-line CommentsSing… Read More
  • HTML Attributes What is an HTML Attribute?HTML attributes provide additional information about HTML elements. Attributes are always specified in the start … Read More
  • Anchor Tag <a> tag defines a hyperlink, which is used to link from one page to another page.Key Characteristics of HTML Anchor LinksSpecified by the … Read More

0 Comments:

Post a Comment

Do leave your comments