Grade 8 HTML Question Bank

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

SETH ANANDRAM JAIPURIA SCHOOL

SESSION 2023-24
GRADE VIII SUBJECT: COMPUTER TERM I
QUESTION BANK ON HTML,CSS & FORMS
---------------------------------------------------------------------------------------------------------
M.C.Q:
1. Which tag do we use in HTML for inserting a line-break?
a. <a> b. <br> c. <b> d. <pre>
Answer: (b) <br>

2. In HTML, how do we insert an image?


a. <img src = “jtp.png” /> b. <img href = “jtp.png” />
c. <img link = “jtp.png” /> d. <img url = “jtp.png” />
Answer: (a) <img src = “jtp.png” />

3. In HTML, we use the <hr> tag for ___________.


a. horizontal ruler b. new line
c. new paragraph d. vertical ruler
Answer: (a) horizontal ruler

4. In HTML, the tags are __________.


a. in upper case b. case-sensitive
c. in lowercase d. not case sensitive
Answer: (d) not case sensitive

5. Which tag is used in HTML5 for the initialization of the document type?
a. <Doctype HTML> b. <!DOCTYPE html>
c. <Doctype> d. <\Doctype html>
Answer: (b) <!DOCTYPE HTML>

6. Which one is the HTML document’s root (main) tag?


a. <head> b. <body>
c. <title> d. <html>
Answer: (d) <html>

7. HTML stands for -


a. HighText Machine Language b. HyperText and links Markup Language
c. HyperText Markup Language d. None of these
Answer: (c)

8. The correct sequence of HTML tags for starting a webpage is -


a. Head, Title, HTML, body b. HTML, Body, Title, Head
c. HTML, Head, Title, Body d. HTML, Head, Title, Body
Answer: (c)

9. Which of the following tag is used for inserting the largest heading in HTML?
a. <h3> b. <h1> c. <h5> d. <h6>
Answer: (b)

10. Which character is used to represent the closing of a tag in HTML?


a. \ b. ! c. / d. .
Ans: (c)

11. How to add a background color in HTML?


a. <body bg color: "red"> b. <body bg-color = "red">
c. <body bgcolor = "red"> d. <body color = "red">
Ans: (c)

12. HTML tags are enclosed in-


a. # and # b. { and }
c. ! and ? d. < and >
Ans: (d)

13. Which of the following tag is used to add rows in the table?
a. <td> and </td> b. <th> and </th>
c. <tr> and </tr> d. None of the above
Ans: (c)

14. The <hr> tag in HTML is used for -


a. new line b. vertical ruler
c. new paragraph d. horizontal ruler
Ans: (d)

15. An HTML program is saved by using the ____ extension.


a) .ht b) .html
c) .hml d) None of the above
Ans: (b)

16. Identify the valid HTML tags for creating a basic HTML page.
a) <HTML> b) <title>
c) <bootstrap> d) <HEAD>
Ans: <HTML>, <title> and <HEAD>

17. Lists items created using the <ul> tag are marked with which of the following?
a) Numbers b) Alphabets
c) Circle Bullets d) Square bullets
Ans: circle bullets and square bullets

18. Which of the following are valid margin specific properties of CSS?
a) Margin-inner b) Margin-outer
c) Margin-bottom d) Margin-left
Ans: Margin-bottom and Margin-left

19. Which of the following are valid CSS properties?


a) font-family b) text-align
c) background-color d) heading
Ans: font-family, text-align, background-color

20. The full form of CSS is:


a) Cascading Style Sheet b) Coloured Special Sheets
c) Color and Style Sheets d) None of the above
Ans: Cascading Style Sheet

21. How can we change the background color of an element ?


a) background-color b) color
c) both a and b d) None of the above
Ans: background-color

22. How can we change the text color of an element ?


a) background-color b) color
c) both a and b d) None of the above
Ans: color

23. In how many ways CSS can be written?


a) 1 b) 2
c) 3 d) 4
Ans: 3

24. Which type of CSS does this code belong to:


<h1 style=”color : blue”> Hi How are you ? </H1>

a) Inline b) Internal
c) External d) None of the above
Ans: Inline

25. Can we have negative values in the padding property?


a) Yes b) No
c) Depends on the property d) None of the above

Ans: No

26. The HTML attribute used to define the inline styles is –


a) style b) styles
c) class d) none of the above

Ans: style

27. Which of the following property is used as the shorthand property of margin properties?
a) margin-left b) margin-right
c) margin d) None of the above

Ans: margin

28. In CSS color:red can be called as:


a) declaration b) Rule
c) Selector d) None of the above

Ans: declaration

29. In CSS, what does font-soze be known as:


a) property b) Rule
c) Selector d) property-name

Ans: property-name

30. From the given options which is/are the valid way to represent a color?
A. A valid color name like "blue" b. HEX code like "#0000ff"
c. RGB Value like "rgb(0,0,255) d. All of the above
Ans: All of the above

31. Choose the correct option.

A. HTML form elements are used for taking user input.


B. HTML form elements are defined inside <form> tag.
C. HTML form elements can be of different types.
D. All of these.

Ans: All of the above

32. Which one of the following is a form element?

A. text box.
B. radio button.
C. submit button.
D. All of these.

Ans: All of the above

33. Which of the following tag is used for drop down list?

A. <select> B. <text>
C. <textarea> D. <dropdown>

Ans: <select>

34. How more than one option can be selected in drop down?

A. Use of multiple attribute inside <option> tag.


B. Use of multiple attribute inside <select> tag.
C. use of multiple attribute inside <text> tag.
D. It is not possible to select more than one option in drop down.

Ans: B

35. Which HTML element is used to define a multi-line input field?


a. <text> b. <textarea>
c. <blocktext> d. <textfield>

Ans: <textarea>

36. For defining a submit button which tag is used?


a. <submit> b. <submit button>
c. <button> d. <action submit>

Ans: <submit>

37. In HTML <input type=”text” is used for:


a. one line of text b. Block of text
c. One paragraph d. None

Ans: one line of text

38. Which of the following is a new input attribute introduce by HTML5?


a) text b) checkbox controls
c) submit buttons d) date

Ans: date
39. Which attribute defines the file-select field?
a) file b) checkbox
c) button d) text

Ans: file

40. Which of the following is not used with password attribute?


a) name b) size
c) maxlength d) min

Ans: min
----------------------------------------------------------------------------------------------------------------------

SHORT ANSWER QUESTIONS:

1) What is the full form of HTML?


Ans: HTML stands for Hyper text markup language.

2) Write the basic structure of an HTML document.


Ans: Basic Structure of HTML:
<!doctype HTML>
<HTML>
<HEAD>
<Title> title of the webpage </Title>
</HEAD>
<BODY>
Content of the webpage
</BODY>
</HTML>

3) How many types of tags are there in HTML?


Ans: There are 2 types of tags in HTML.
1) Container tags 2) Empty tags

4) What are container tags? Give any 4 examples.


Ans: Container tags are the tags which need to be opened and closed both.
For eg: HTML, HEAD, TITLE, BODY
<HTML>…..</HTML>

5) What are empty tags? Give any 4 examples.


Ans: Empty tags are the tags which need not to be closed.
For eg: <BR>, <HR>, <P>, <!DOCTYPE>

6) Is HTML a case-sensitive language?


Ans: No, HTML is not a case sensitive language. Capital and small letters are considered as same in HTML.
7) Name the command/tag in HTML used to draw a line on the webpage.
Ans: <HR> - Horizontal Rule is used to draw a line on the webpage.

8) Name the command/tag in HTML used to change the line while writing text on a webpage.
Ans: <BR> - Break line is used to change the line while writing text on a webpage.
For eg: Hi <br> Hello
OUTPUT: Hi
Hello
9) Name the command/tag in HTML used to change the paragraph while writing text on a webpage.
Ans: <P> - Paragraph tag is used to change the paragraph while writing text on a webpage.

10) Write the differences between <P> and <BR> tag.


Ans: When a line break is inserted the cursor moves down a single line, which is different from the
paragraph which ends the paragraph and starts a new one.

11) What is the heading in HTML?


Ans: A heading is the title or subtitle to be displayed on the page.

12) How many levels of headings are provided by HTML?


Ans: There are 6 levels of headings in HTML.

13) Name the smallest level of heading.


Ans: <h6> is the smallest level of heading in HTML.

14) Name the biggest level of heading.


Ans: <h1> is the biggest level of heading in HTML.

15) Can we link an image on our webpage? If yes, how?


Ans: Yes, we can link an image on our webpage using the <img> tag.

16) Can we link our webpage to other webpages? If yes, how?


Ans: Yes, we can link a webpage to another page in HTML using the anchor tag <a>

17) Explain the <hr> tag.


Ans: <HR> tag is used to draw a horizontal rule (line) on the webpage.

18) Explain the <img> tag.


Ans: <img> tag is used to link an image in the webpage.

19) Explain the <a> tag.


Ans: <a> tag is known as Anchor tag. It is used to link a webpage to another.

20) Write a note on <div> tag in HTML.


Ans: The div tag is known as Division tag. The div tag is used in HTML to make divisions of content in
the web page. It is a container tag.

QUESTIONS ON CSS

21) Explain a few advantages of CSS.


Ans: CSS has been designed to add style to the webpage. The major advantage of CSS is that it saves a lot
of time while we are formatting the look of the webpage.

22) What was the major purpose for creating CSS?


Ans: CSS is used for defining the styles for web pages. It describes the look and formatting of a document
which is written in a markup language. It provides an additional feature to HTML. It is generally used with
HTML to change the style of web pages and user interfaces.

23) What is the difference between HTML and CSS?


Ans: HTML is a markup language used to create static web pages and web applications. CSS is a style sheet
language responsible for the presentation of documents written in a markup language.

24) Which one is better HTML or CSS?


Ans: They both provide different functionalities. As HTML is used to structure the content on websites. On
the other hand, CSS provides styling to those websites by adding style properties like font size, font family,
margin, padding, border, so on and so forth.

25) What is the latest version of CSS?


Ans: CSS 3 is the latest version of CSS.

26) What is inline CSS?


Ans: Inline CSS is the technique which allows us to define the style for a single element on the webpage.

27) Name the CSS technique used for quick styling of the webpage.
Ans: Inline CSS is used for quick and specific styling.

28) What is the difference between inline and internal CSS.


Ans: The main difference between the two lies in the location where they are written. Internal CSS is written
inside the <head> tag and is defined only once for the entire webpage whereas inline CSS is written inside
the <body> tag and needs to define every time we use a tag.

QUESTIONS ON HTML FORMS

29. What are HTML Forms?


Ans: An HTML Form is a section of the document that collects input from the user.

30. Name the tag used to create a form in HTML.


Ans: <form> tag

31. Name any 6 form elements.


Ans: Some common form elements are: text inputs, textarea fields, checkboxes, radio buttons, password,
date field.

32. Write a note on select menu in HTML.


Ans: These are used to create a menu with options in it. Select menu is mainly used to select one option
from a dropdown menu.

33. Write a note on checkboxes in HTML.


Ans: These are used for taking one or more input from the user. Checkboxes are mostly used in the form
where the user wants to select more than one option.

34. Write a note on Radio button in HTML.


Ans: These are used to select only one input at a time. Radio buttons are mostly used in the fields where we
have to choose only one specified input.

35. What is the difference between text and textfield in HTML.


Ans: A text field is a small, typically rectangular box where you can enter a single line of text, such as a
name, number, or any other short text type. A text area is a larger box where you can enter multiple lines of
text, such as descriptions, paragraphs, and so on

36. What is the difference between checkbox and radio button in HTML.
Ans: Checkboxes allow the user to choose items from a fixed number of alternatives, while radio buttons
allow the user to choose exactly one item from a list of several predefined alternatives.

37. What is the benefit of having HTML forms?


Ans: HTML Form is a document that stores information of a user on a web server using interactive controls.
An HTML form contains different kinds of information such as username, password, contact number, email
id, etc.

Creating web forms allows you to control the quality of the data you're collecting. By setting up controls to
ensure that invalid details cannot be submitted (including their email address, phone number, etc.) your team
can ensure accurate data capture upfront.

38. What is the difference between Submit & Reset button in HTML?
Ans: Submit Button - Submit Button allow the user to send the form data onwards for processing. Reset
button - Reset button allows the user to clear the form fields of all entered information.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy