Class - 7th
Subject : Computer
L-5 HTML and CSS
A) Tick the correct option:
1) Which tag is used for ordered list?
a) <li>
b) <ol>
c) <ul>
d) <dl>
Ans: b) <ol>
2) Which of the following can't be the value of list-style-type?
a) square
b) circle
c) ellipse
d) disc
Ans: c) ellipse
3) Which element contains definition?
a) <dl>
b) <dd>
c) <dt>
d) <ul>
Ans: c) <dt>
4) Which attribute is only used with <ol>?
a) value
b) type
c) compact
d) start
Ans: b) type
5) Identify tag which is used for unordered list?
a) <li>
b) <ol>
c) <ul>
d) <dl>
Ans: c) <ul>
6) Which type of CSS is used in the below code?
<p style="border:px solid red;">
a) Inline CSS
b) Internal CSS
c) External CSS
d) None of the above
Ans: a) Inline CSS
B) Fill in the blanks:
C) State 'T' for True or 'F' for False.
1) <IMG> tag is used to insert an image in a web page TRUE
2) Src attribute specify the source of an image. TRUE
3) By default, unordered list starts with disc. TRUE
4) There are two types of images: Inline and External images. FALSE
5) The HTML attribute used to define the inline styles is style. TRUE
6) JPG, PNG, and JPEG are image formats. TRUE
D) Short answer type questions:
1) Define a list.
Ans: A list is an HTML element used to group together related items in a specific order or hierarchy.
2) What is the use of Description List?
Ans: A Description List in HTML (<dl>) is used to define terms and provide a description or definition for each term.
3) How we can insert image in a table? give example
Ans: To insert an image in a table, you can use the <img>
tag within a <td>
(table data) element. Here's an example:
<Table>
<TR>
<TD><img src="image.jpg" alt="description of the image"> </td>
<td> other content</td>
</TR>
</Table>
4) What do you understand by CSS.
Ans: CSS stands for Cascading Style Sheets. It's a stylesheet language used to control the presentation and layout of a web page written in HTML or XML. CSS allows you to apply styles (such as colors, fonts, spacing, etc.) to elements on a webpage, making it visually appealing and user-friendly.
E) Long answer type questions:
1) Differentiate between ordered and unordered list?
Ans: Ordered List vs Unordered List:
- Ordered List: The items in an ordered list are marked with numbers or letters by default. It is created using the
<ol>
tag. - Unordered List: The items in an unordered list are marked with bullets (discs, squares, etc.) by default. It is created using the
<ul>
tag.
2) What are the different attributes of an image tag. (list any three)?
Ans: Attributes of an Image Tag:
src
: Specifies the source (URL) of the image.alt
: Provides alternative text for the image, which is displayed if the image cannot be loaded.width
andheight
: Set the dimensions of the image.
3) Write any one difference between internal & external style sheet?
Ans: Difference between Internal & External Style Sheet:
Internal Style Sheet: It is defined within the HTML document using the
<style>
tag in the head section. It applies styles only to the current document.External Style Sheet: It is a separate file with a
.css
extension that contains all the styles. It is linked to the HTML document using the<link>
tag. It can be used to style multiple HTML documents.
F) Application based questions:
1) Aditi wants to celebrate her birthday. So she is interested to make a list of guests. Suggest her which tag she will use to make list?
Ans: Aditi can use the <ul>
(unordered list) or <ol>
(ordered list) tags to make a list of guests.
2) Mehul is interested to create a list of state and capitals of India. Which tag you will suggest him to make a list?
Ans: Mehul can use the <dl>
(definition list) tag to create a list of states and their capitals in India.
.
No comments:
Post a Comment