“HTML Elements Showcase – Inline vs Block”

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 Elements

<P>

This is a paragraph

The <p> tag is define a block of text that always starts on a new line



<h1>

This is Heading 1 used for main heading

Heading are block-level elements that take the full width.



<div>

This is a div with container text

here,<div> is used just to group elements for CSS styling



<nav>

This is a nav which contains a link

this is a container that contains all links in a same nav in that all the links will be in diffrent lines through that is specifies the link



<hr>

This is a hr tag

This is a hr tag which used when we need a horizontal line on the web page and this also a block elements



<ul>

This is ul tag used for unodered list

This is ul tag used for unordered list which is used for listing the



<blockquote >

Coding is the literacy.

Blockquote is a block container for quotations.



<li>

  • used in listing
  • used in listing as ordered or unordered



    <table>

    to write in manner

    As table is made for simple and in self explanatary form



    Inline Elements



    <i>

    hello

    This a italic font used to change font inn same paragraph for highlighting a perticular world

    <span>

    used to change style

    Used to change colour in para whether you have to highlight some particular line

    <a>

    click me

    This is known as anchor tag used to link website or pages

    <u>

    Hello

    Used to underline the world which is important in the refrence of article

    <b>

    bold

    The b tag is used to bold a word which is important

    <sup>

    42

    Used to write aa mathematical operation as square, cube , etc.


    <abbr>

    SNU

    It is used to show a full form or somthing which were shown as the user hower through it


    <sub>

    H2O

    Used to write a chemical formula for chemistry in HTML

    <code>

            
                int main(){
                    printf("HELLO WORLD");
                    return 0;
                }
            

    Used to write a demo code in HTML



    Block Elements Inline Elements
    <div> <span>
    <p> <a>
    <h1> <b>
    <ul> <i>
    <blockquote> <abbr>
    <table> <code>
    <hr> <sup>
    <section> <mark>
    <nav> <sub>
    Back to Top