Skip to content

Desktop and Web Programming

SWE · Quiz · Fall 26

Paper 2 of 4Section C · Batch 44 · Jobayer Ahmed Usamah - SWE (251) (1)Switch

Section C · Batch 44

Paper 2 of 4

This browser can’t show the PDF here

Open it, and your phone’s PDF viewer takes it, or download it.

Read the questions as text

Read off the PDF by AI, so it may have mistakes. The PDF is the original.

Daffodil International University Faculty of Science & Technology Department of Software Engineering Course Code: SE 235 Course Title: Web & Desktop Programming Quiz 1 CSS Styling and Box Model Total Marks: 15 Time: 40 minutes You are given the following HTML: <div class="card"> <h2>Student Portal</h2> <p>Welcome to the student portal.</p> </div> a) Give the card a width of 300px, padding of 20px, a 2px solid border, and margin of 30px. (4 marks) b) Set box-sizing so that the declared width includes the content, padding, and border. (2 marks) c) Give the card a background color and make the heading centered with an appropriate font size. (3 marks) d) Explain the difference between padding, border, and margin in this example. (3 marks) e) Explain why box-sizing: border-box makes the card's size easier to control. (3 marks)