You have the following HTML code.
You need to identify how Text1 and Text2 will be displayed.
What should you identify?
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
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.
Agree – option C
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>
It is C the answer correct
the colored element are span and div but you have used both as span. So the answer is C
Answer is C !
Confirmed and tested !
C is cool
Answer is C
C is correct.