Sample Question Paper: Web Development
Calcutta University - Computer Science (SEC-A-1: HTML Programming)
Semester: II, Academic Year: 2023-2024
Time: 2 Hours Full Marks: 50
Instructions:
• Answer all questions.
• Marks are indicated against each question.
• Provide code snippets where required.
• Answers should be concise and clear.
Section A: Multiple Choice Questions (10 Marks, 2 marks each)
1. Which HTML tag is used to create a hyperlink?
a) <link>
b) <a>
c) <href>
d) <url>
Answer: b) <a>
2. In CSS, which property is used to center a div horizontally?
a) text-align: center;
b) margin: auto;
c) align: center;
d) float: center;
Answer: b) margin: auto;
3. Which HTML element is used to define a navigation menu?
a) <menu>
b) <nav>
c) <header>
d) <section>
Answer: b) <nav>
4. In CSS, the box-sizing: border-box; property ensures:
a) Padding and border are included in the elements total width
b) Only margin is included in the width
c) The element floats to the left
d) The element is hidden
Answer: a) Padding and border are included in the elements total width
1
5. Which JavaScript method adds an element to the end of an array?
a) push()
b) pop()
c) shift()
d) unshift()
Answer: a) push()
Section B: Short Answer Questions (20 Marks, 5 marks each)
6. Explain the difference between <div> and <section> tags in HTML. Provide an
example of each.
7. Write a CSS rule to style a button with a red background, white text, and a hover effect
that changes the background to dark red.
8. Describe the purpose of the CSS float property. Provide an example of its use in a
webpage layout.
9. Explain the role of the <meta> tag in HTML. Provide two examples of <meta> tags
used in a webpage.
Section C: Long Answer Questions (20 Marks, 10 marks each)
10. Write an HTML and CSS code snippet to create a responsive navigation bar with three
menu items (Home, About, Contact). Ensure the menu stacks vertically on screens
smaller than 600px.
11. Design a simple webpage layout using HTML and CSS Flexbox, including a header,
main content area, and footer. Explain how Flexbox properties are used to achieve the
layout.