Class – VIII
Subject:
Computer
L-7
HTML and CSS
A.) Tick (ΓΌ) the correct option:
1)
You can change the look of an entire
website by changing just one file:
a)
external style sheet
b)
Internal style sheet
c)
Both a and b
d)
None of these
Ans:
c) Both a and b
2)
Which is the simplest language that
can be easily understood and modified.
a)
Java
b)
PHP
c)
HTML
d)
Visual Basic
Ans: c) HTML
3)
HTML is platform-
a)
Independent
b)
Dependent
c)
Both a and b
d)
None of these
Ans: a) Independent
4)
Which language allows you
to put styles to customize your web pages.
a)
CSS
b)
JAVA
c)
C
d)
C++
Ans: a) CSS
5)
CSS stands for
a)
Cascading style sheet
b)
Cast counting style sheet
c)
Cast common style sheet
d)
Castcading Style sheet
Ans: a) Cascading Style Sheet
B.) Fill in the blanks using the words from the help box:
[attributes, CSS, Embedded, elements,
<link>]
1)
HTML allows images and objects to be Embedded and can be used to create interactive
forms.
2)
External styles are defined within
the <link> element, inside
the <head> section of an HTML page.
3)
CSS is considered
a very convenient and easy-to-read styling sheet.
4)
Attributes can be used
to change the colour, size, or functionality of HTML elements.
5)
HTML element
can
contain formatting instructions, semantic meaning, and content.
C) Short answer type questions:
1) What do you mean by element?
Ans: An element is a fundamental
building block of an HTML document. It consists of a start tag, content, and an
end tag. Elements can define various types of content, such as headings,
paragraphs, links, images, etc.
2)
What do you mean attribute?
Ans: An attribute provides
additional information about an HTML element and is always included in the
opening tag. Attributes consist of a name and a value and are used to modify or
provide additional details about an element.
3)
What is internal CSS?
Ans: Internal CSS refers to the
style information that is contained within the HTML document itself, typically
placed in the <style> element within the <head> section. It allows
styling for a specific page.
4)
What is External CSS?
Ans: External CSS involves placing
the style information in a separate external file with a .css extension. This
file is linked to the HTML document using the <link> element, providing a
centralized and consistent style for multiple pages.
5)
What is inline CSS?
Ans: Inline CSS involves applying styles directly within
the HTML tags using the style attribute. It is used for applying unique styles
to specific elements on a page.
D) Long answer type questions:
1) What are the advantages and disadvantages of
CSS?
Ans: Advantages of
CSS include improved site maintenance, consistent styling, faster page loading,
and better accessibility. Disadvantages may include browser compatibility
issues, learning curve, and potential for increased complexity.
2) Write the characteristics of HTML?
Ans: HTML
(Hypertext Markup Language) is characterized by being a markup language used
for creating the structure of web pages. It consists of elements represented by
tags, has a hierarchical structure, supports hyperlinks, and allows the
inclusion of multimedia elements.
3) Write a short note on
a) Element
Ans: An element in
HTML is a fundamental unit consisting of a start tag, content, and an end tag.
It defines the structure and content of a document, representing various types
of information like text, images, links, etc.
b) Attribute
Ans: An attribute
in HTML provides additional information about an element and is included within
the opening tag. It consists of a name and a value, modifying or enhancing the
behavior of the element.
c) CSS
Ans: CSS
(Cascading Style Sheets) is a styling language used to control the presentation
and layout of HTML documents. It allows the separation of content and style,
making it easier to manage the visual aspects of a website.
4) How we add CSS?
Ans: CSS can be
added to HTML documents through three methods: inline, internal, and external.
Inline CSS is applied directly within the HTML tags using the style attribute,
internal CSS is placed in the <style> element within the <head>
section, and external CSS is stored in a separate .css file linked to the HTML
document using the <link> element.
5) Explain the three ways to add CSS.
Ans: The three
ways to add CSS are:
Inline CSS: Applied directly within HTML tags using
the style attribute.
Internal CSS: Placed in the <style> element
within the <head> section of an HTML document.
External CSS: Stored in a separate .css file and
linked to the HTML document using the <link> element. This promotes
consistency across multiple pages.
6) What are the component of CSS?
Ans: The
components of CSS include:
Selectors: Define which elements the styles should
apply to.
Properties: Specify the visual characteristics (e.g.,
color, size) of the selected elements.
Values: Assign specific values to properties to
determine the appearance of elements.
Declarations: Combinations of properties and values.
Rules: Consist of selectors and declarations, defining
the styling for selected elements.
Stylesheet: A collection of rules that collectively
define the visual presentation of a document.
No comments:
Post a Comment