Showing posts with label Block or Inline?. Show all posts
Showing posts with label Block or Inline?. Show all posts

Monday, November 7, 2022

Block or Inline?

 


Block or Inline?

We have to identify whether the following elements are block or inline. To identify that, please render each element twice inside a block.

<html>
<head>
</head>
<body>
    <div data-ns-test="block-inline-sup">
        <sup>Test1</sup>
        <sup>Test2</sup>
        Answer: Inline
    </div> 

    <div data-ns-test="block-inline-sub">
        <sub>Test1</sub>
        <sub>Test2</sub>
        Answer: Inline
    </div>
    
    <div data-ns-test="block-inline-h1">
        <h1>Test1</h1>
        <h1>Test2</h1>
        Answer: Block
    </div> 

    <div data-ns-test="block-inline-code">
        <code>Test1</code>
        <code>Test2</code>
        Answer: Inline
    </div> 

    <div data-ns-test="block-inline-input">
        <input>Test1</input>
        <input>Test2</input>
        Answer: Inline
    </div> 

    <div data-ns-test="block-inline-p">
        <p>Test1</p>
        <p>Test2</p>
        Answer: Block
    </div> 

    <div data-ns-test="block-inline-span">
        <span>Test1</span>
        <span>Test2</span>
        Answer: Inline
    </div> 

    <div data-ns-test="block-inline-div">
        <div>Test1</div>
        <div>Test2</div>
        Answer: Block
    </div> 

    <div data-ns-test="block-inline-button">
        <button>Test1</button>
        <button>Test2</button>
        Answer: Inline
    </div> 


</body>
</html>








ads vert

Basic HTML Tables - Layout, HTML Tables, Attributes, Aside, Footer, Tr tag, Td tag, Th tag, Tbody

  Basic HTML Tables - Layout, HTML Tables, Attributes, Aside, Footer, Tr tag, Td tag, Th tag, Tbody < table >      < thead >    ...