HTML & CSS Final (SET - 10) Full Marks : 100
A) HTML MCQ Question (Marks : 25 )
1. What is the correct HTML code for inserting an image?
a) <img href="image.gif" alt="MyImage"> b) <img src="image.gif" alt="MyImage">
c) <img alt="MyImage">image.gif</img> d) All of these
2. Which tag is used to display an image in HTML?
a) <picture> b) <image> c) <img> d) <src>
3. How can you create a link to another file in HTML?
a) <A HREF="#Name">My Choice</A> b) <A HREF="abc.htm">My Choice</A>
c) <A IMG="abc.jpg">My Choice</A> d) <A SRC="abc.htm">My Choice</A>
4. Which tag is used to add a row in a table?
a) <td> and </td> b) <tr> and </tr> c) <th> and </th> d) <cr> and </cr>
5. The tag used to give a caption to the table is:
a) <CAPTION> b) <CAP> c) <C> d) All of these
6. Which of the following is an empty tag?
a) <table> b) <img> c) <tr> d) <td>
7. What does the <TH> tag represent in a table?
a) Header of the table
b) Footer of the table
c) Data cell in the table
d) Row in the table
8. Which attribute of the <TD> tag prevents text from wrapping?
a) nowrap b) align c) border d) cell-padding
9. Which attribute specifies the height of an image in the <IMG> tag?
a) HEIGHT b) WIDTH c) SRC d) ALT
10. The <TABLE> tag is used to:
a) Insert an image b) Create a table c) Add a link d) Create a paragraph
11. What does the attribute "SRC" in the <IMG> tag define?
a) The source file for the image b) The height of the image c) The width of the image d) The
border of the image
12. Which tag is used to define a row in a table?
a) <TR> b) <TD> c) <TH> d)
<CAPTION>
13. What is the role of the <CAPTION> tag in HTML?
a) To add a caption to a table b) To create a hyperlink c) To define an image d) To start a
new paragraph
14. Which tag is used to create a hyperlink in HTML?
a) <A> b) <IMG> c) <SRC> d) <LINK>
15. What does the attribute "ALIGN" do in the <TABLE> tag?
a) Aligns the table content b) Resizes the table c) Adds color to the table d) Adds a
border to the table
16. Which of the following is used to define a section in a document?
a) <A NAME> b) <IMG> c) <TR> d) <CAPTION>
17. The <TD> tag is used for:
a) Table data cell b) Table header c) Table row d) Table caption
18. What does the "BORDER" attribute in the <TABLE> tag define?
a) The thickness of the border around the table b) The width of the table
c) The color of the table d) The height of the table
19. Which tag is used to define the header of a table?
a) <TH> b) <TR> c) <TD> d) <CAPTION>
20. The attribute "VALIGN" in the <TABLE> tag stands for:
a) Vertical alignment b) Horizontal alignment c) Text wrapping 21. d) Cell padding
What does the <A> tag define in HTML?
a) A hyperlink b) A table c) A paragraph d) An image
22. Which tag must be immediately after the opening <TABLE> tag if a caption is needed?
a) <CAPTION> b) <CAP> c) <C> d) <TH>
23. How can you specify the width of a table in HTML?
a) WIDTH attribute b) HEIGHT attribute c) BORDER attribute d) ALIGN
attribute24. The <TR> tag in HTML is used for:
a) Defining a row in a table b) Defining a column in a table c) Defining the table header
d) Defining the table footer
25. What does the attribute "CELLPADDING" in the <TABLE> tag define?
a) Space between the cell content and the cell border b) Space between cells
c) Space between rows d) Space between columns
26. The <IMG> tag requires which of the following attributes?
a) SRC b) TABLE c) ALIGN d) CAPTION
27. Which attribute of the <TABLE> tag is used to specify the space between cells?
a) CELLSPACING b) CELLPADDING c) ALIGN d) BORDER
28. Which of the following tags is used to create a table?
a) <TABLE> b) <IMG> c) <TR> d) <TD>
29. What is the function of the "ALT" attribute in the <IMG> tag?
a) Provides alternative text if the image cannot be displayed b) Specifies the source of the image
c) Defines the height of the image d) Defines the width of the image
30. Which of the following tags is used to create a data cell in a table?
a) <TD> b) <TR> c) <TH> d)
<CAPTION>
B) CSS MCQ Question (Marks:25)
1. Which CSS property is used to set the margin properties in one declaration?
a) Margin b) Margin-bottom c) Margin-top d) Margin-left
2. The property used to repeat the image vertically at the background is:
a) Background b) Background-repeat: repeat-y c) Background-repeat: repeat-x d) Backgroundimage
3. What is the correct CSS syntax for making all the elements bold?
a) p {font-weight: bold} b) p {text-size: bold} c) p {font-style: bold} d) p {text-weight: bold}
4. Which property is used to set the background image of an element?
a) Background-color b) Background-image c) Background-repeat d) Background-attachment
5. Which property is used to control the repetition of an image in the background?
a) Background-color b) Background-image c) Background-repeat d) Background-attachment
6. Which property is used to make a font italic?
a) Font-weight b) Font-variant c) Font-style d) Font-family
7. Which property is used to create a small-caps effect?
a) Font-style b) Font-variant c) Font-weight d) Font-size
8. Which property is used to increase or decrease how bold or light a font appears?
a) Font-size b) Font-weight c) Font-variant d) Font-style
9. Which property is used to increase or decrease space between the letters that make up a
word?
a) Word-spacing b) Letter-spacing c) Text-align d) Line-height
10. Which property specifies the width of a border?
a) Border-width b) Border-style c) Border-color 11. d) Border-radius
Which property specifies the right margin of an element?
a) Padding-right b) Margin-right c) Border-right 12. d) Text-align
Which property specifies the left padding of an element?
a) Margin-left b) Border-left c) Padding-left d) Text-align
13. What is the correct syntax to set a background image that repeats only horizontally?
a) background-repeat: repeat-y; b) background-repeat: repeat-x; c) background-image: repeat-x; d)
background-position: repeat-y;
14. The amount of space between letters can be specified using which property?
a) Letter-spacing b) Word-spacing c) Text-align d) Line-heigh
15. Which property is used to specify the type of font applicable to the text?
a) Font-style b) Font-family c) Font-size d) Font-weight
16. Which property adjusts the distance between the border of the text background and the text
itself?
a) Margin b) Padding c) Border-spacing d) Line-height
17. Which of the following is not a way to insert a stylesheet into an HTML document?
a) Inline b) External c) Embedded d) Direct
18. Which CSS property can be used to change the face of a font?
a) Font-family b) Font-variant c) Font-style d) Font-weight
19. Which property is used to control the spacing between words in a sentence?
a) Letter-spacing b) Word-spacing c) Text-align d) Line-height
20. Which CSS property is used to make text bold?
a) Font-weight b) Font-style c) Text-align d) Font-variant
21. To change the left margin of an element, which CSS property is used?
a) left-margin b) margin-left c) padding-left d) border-left
22. Which of the following is used to create a class in CSS?
a) # b) . c) * d) &
23. Which property is used to set the background color of an element?
a) Background-color b) Background-image c) Background-repeat d) Color
24. Which CSS property is used to control the visibility of an element?
a) Display b) Visibility c) Opacity d) Hidden
25. The `span` tag in HTML is used to:
a) Apply styles to a small section of text b) Create a bold effect c) Insert an image d)
Create a new line
26. Which of the following CSS properties can be used to set the text color?
a) Color b) Font-color c) Text-color d) Font-style
27. What is the default value of the `position` property in CSS?
a) Static b) Relative c) Absolute d) Fixed
28. Which property would you use to hide an element but still maintain its space in the layout?
a) Display: none; b) Visibility: hidden; c) Opacity: 0; d) Position: absolute;
29. Which property is used to add space between the text and the border of an element?
a) Padding b) Margin c) Border d) Outline
30. Which of the following is true about the CSS `box-model`?
a) includes only the padding and border of an element. b) includes the content, padding, border, and
margin of an element.
c) includes only the content and padding of an element. d) includes only the content and border of an
element.
C) HTML – CSS Practical Project (Marks: 50)
Instructions: Create a webpage to showcase a fictional product. The webpage
should include the following elements and meet the specified requirements:
1. Header (10 marks)
o A navigation bar with links to "Home," "About," and "Contact."
o The header should have a logo on the left and navigation links on
the right.
2. Product Section (15 marks)
o Display a product image and a brief description.
o Include a title, subtitle, and a price for the product.
o Add an "Add to Cart" button with hover effects.
3. Features Section (10 marks)
o Create a section that highlights key features of the product using a
grid layout.
o Each feature should be presented in a separate card with an icon
and a short description.
4. Testimonials Section (10 marks)
o Display user testimonials in a carousel or slider format.
o Each testimonial should include the user's name, photo, and
feedback.
5. Footer (5 marks)
o Include contact information and social media links.
o The footer should be styled to match the overall theme of the
webpage.
6. Responsiveness (5 marks)
o Ensure that the webpage is responsive and looks good on different
screen sizes (mobile, tablet, and desktop).
Bonus (5 marks):
• Add smooth scrolling effects when navigating between sections.
Submission Requirements:
• Provide the HTML and CSS code in separate files.
• Ensure that the design is visually appealing and follows good design
principles.
• Include comments in your code to explain the purpose of each section.