Block and Inline Elements

Block-level element – It creates large blocks of content like paragraphs or page divisions. They start new lines of text and can contain other blocks as well as inline elements and text or data. They include the <p> , <h1> , <h2> , <h3> , <h4> , <h5> , <h6> , <ul> , <ol> , <dl> , <pre> , <hr /> , <blockquote> and <address> elements. Its features are

  • It forms a block and positions itself with a new empty line above and under
  • It occupies all the available width.
  • Its height changes according to its content
  • It can contains inline and block elements

Inline elements – It is an element which can appear within sentences and do not have to appear on new lines of their own. They don’t start new lines and contain other inline tags and text or data. They include The <b> , <i> , <u> , <em> , <strong> , <sup> , <sub> , <big> , <small> , <ins> , <del>, <code> , <cite> , <dfn> , <kbd> and <var> elements. Its features are

  • It positions itself horizontally with the rest of the content
  • It takes the minimum width and height as per its content
  • It can contains only other inline elements

Apply for HTML Certification

https://www.vskills.in/certification/certified-html-designer

Back to Tutorials

Get industry recognized certification – Contact us

Menu