HTML Blocks | 99codes

HTML BLOCKS


All the HTML components can be ordered into two classifications (a) Block Level Elements (b)Inline Elements.

html blocks

Block Element -


Square components show up on the screen as though they have a line break when them. For instance, the <p>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <ul>, <ol>, <dl>, <pre>, <hr/>, <blockquote>, and <address> components are all square dimension components. They all begin their own new line, and anything that tails them shows up individually new line.

Inline Element -


Inline components, then again, can show up inside sentences and don't need to show up on another line of their own. The <b>, <i>, <u>, <em>, <strong>, <sup>, <sub>, <big>, <small>, <li>, <ins>, <del>, <code>, <cite>, <dfn>, <kbd>, and <var> components are all inline components.

Grouping HTML Element -


There are two vital labels which we utilize in all respects every now and again to amass different other HTML labels (I) <div> tag and (ii) <span> tag

The <div> tag -


This is the vital square dimension label which assumes a major job in gathering different other HTML labels and applying CSS on gathering of components. Indeed, even now <div> tag can be utilized to make site page format where we characterize distinctive parts (Left, Right, Top and so forth.) of the page utilizing <div> tag. This tag does not give any visual change on the square but rather this has additionally meaning when it is utilized with CSS.

Example -


Following is a basic case of <div> tag. We will get the hang of Cascading Style Sheet (CSS) in a different section yet we utilized it here to demonstrate the utilization of <div> tag −



This will produce the following result −

This is first group

Following is a list of vegetables
  • Beetroot
  • Ginger
  • Potato
  • Radish

This is second group

Following is a list of fruits
  • Apple
  • Banana
  • Mango
  • Strawberry

The <span> tag -


The HTML <span> is an inline component and it very well may be utilized to bunch inline-components in a HTML report. This tag likewise does not give any visual change on the square but rather has all the more importance when it is utilized with CSS.

The contrast between the <span> tag and the <div> tag is that the <span> tag is utilized with inline components though the <div> tag is utilized with square dimension components.


Example -


Following is a basic case of <span> tag. We will get the hang of Cascading Style Sheet (CSS) in a different section however we utilized it here to demonstrate the use of <span> tag −

 


This will produce the following result −


This is red and this is green



HTML Blocks | 99codes HTML Blocks | 99codes Reviewed by Arup Roy on March 30, 2019 Rating: 5

No comments:

Powered by Blogger.