Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Create a responsive div that adjusts its width to 50% of the screen.

Easy

Problem Statement

Create a responsive div that adjusts its width to 50% of the screen.

Sample Input

A webpage with a <div> element.

Sample Output

The div's width is 50% of the screen size.

Limits

Time: 2s · Memory: 256 MB

Code Editor

Try your code in this preview. Submit marks it done.

<!DOCTYPE html> <html> <head> <style> /* Add CSS here to style the div */ </style> </head> <body> <div class="responsive-div">Content inside the div</div> </body> </html>

Document

To view the HTML changes, please type the code within the editor