Qtr No. 213, New Town Yehlanka Indore 454775
//style.css
div{
width: 100%;
background-color: yellow;
}
@media (max-width: 576px) {
div {
width: 50%;
background-color: red;
}
}
@media (width: 576px) {
div {
width: 50%;
background-color: aqua;
}
}
@media (min-width: 576px) {
div {
width: 50%;
background-color: green;
}
}
// index.html
<div> Hello World </div>
Observe the above code and identify the change in UI after we remove "
div{
width: 100%;
background-color: yellow;
}"
from styling of div tag
error: Cant use properties in media queries which are not initialised outside media queries.
the div will contain full width on mobile and laptop devices and background-color will be "white"/default color.
the div will contain half width on mobile and laptop devices and background-color will be red for screen size less than 576px, aqua for screen size 576px, and green for screen size more than 576px.
None of the above
To get all Infosys Certified L1 Junior Web Programmer Exam questions Join Group https://bit.ly/infy_premium_group
We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.
Qtr No. 213, New Town Yehlanka Indore 454775
admin@prepflix.in