In HTML, elements are broadly divided into two categories: block-level and inline. Block elements take up the full width, while inline elements only take as much space as needed.
Block-level Elements Inline Elements Comparision TableExplanation: The <p> tag defines a block of text that always starts on a new line.
Explanation: Headings are block-level elements that take the full width.
Explanation: Displays a list of items with bullet points.
Explanation: Displays a list of items with numbers or letters in sequence.
"Coding is the new literacy."
Explanation: Blockquote is a block container for quotations.
Explanation: he <hr> tag in HTML is used to insert a horizontal line (thematic break) across the page, often to separate content.
Explanation: table is created using the <table> tag, and it organizes data into rows and columns.
| Name | Roll no. |
|---|---|
| Anand Suthar | 1 |
Explanation: Span is an inline container with no new line.
Explanation: The <a> tag in HTML is called the anchor tag, and it is used to create hyperlinks that connect to other web pages, sections, email, or files.
This is bold This is italic This is underline This is strong This is Emphasis
Explanation: Text Formatting Elements are used to style or emphasize text. They can be presentational (style only) or semantic (carry meaning).
Explanation: Displays text as superscript (slightly above the line, e.g., x²).
Explanation: Displays text as subscript (slightly below the line, e.g., H₂O).
Explanation: Highlights text with a yellow background by default.
Explanation: Abbr defines an abbreviation.
#include<stdio.h>
int main(){
printf("Hello World!");
return 0;
}
Explanation: This tag is used for code's
| Block Elements | Inline Elements |
|---|---|
| <div> | <span> |
| <p> | <a> |
| <h1> | <b> |
| <ul> | <i> |
| <blockquote> | <abbr> |
| <table> | <code> |
| <hr> | <sup> |
| <section> | <mark> |