PrepAway - Latest Free Exam Questions & Answers

What should you identify?

You have the following HTML code.

You need to identify how Text1 and Text2 will be displayed.
What should you identify?

PrepAway - Latest Free Exam Questions & Answers

A.
Option A

B.
Option B

C.
Option C

D.
Option D


Explanation:
https://www.quackit.com/html_5/tags/html_span_tag.cfm
https://www.quackit.com/html_5/tags/html_body_tag.cfm
https://www.quackit.com/html_5/tags/html_div_tag.cfm

12 Comments on “What should you identify?

  1. Rafal says:

    Option C IMO, span is an inline element which has no width property.
    If we would add “display: inline-block” to span then width would work but still div element would take Text2 to another line.




    20



    0
  2. CasiProgramoMEXAPOWA says:

    The correct answer is D
    check the following code:
    //!DOCTYPE html>
    //html>
    //head>
    //meta charset=”utf-8″>
    //title>///title>
    ///head>
    //body style=”background-color:grey”>
    //span style=”background-color:red; width:50%”>text 1///span>
    //span style=”background-color:blue; width:50%”>text 2///span>
    ///body>
    ///html>




    0



    21

Leave a Reply