computer MCQs
9th • Chapter 08
50 Questions TextBook
1
Who is credited with creating HTML in 1991?
2
What does CSS stand for?
3
Which HTML tag is used to create a hyperlink?
4
Which CSS property is used to change the background color of an element?
5
Which HTML attribute is used to define inline styles?
6
Which of the following represents the correct syntax for a CSS rule?
A
selector {property=value}B
selector: {property: value;};C
selector {property: value;}D
selector {property: value;}; 7
In JavaScript, which characters are used to denote a single-line comment?
8
Which tag is the correct way to include an external JavaScript file named 'script.js'?
A
<script src="script.js"></script>B
<java src="script.js"></java>C
<js src="script.js"></js>D
<code src="script.js"></code> 9
Which HTML tag is used to create an unordered list?
10
Which tag is used to display a horizontal line in HTML?
11
Which of the following is NOT a correct HTML tag according to the text?
12
Which HTML version, released in 2014, is the latest version mentioned in the text?
13
What does front-end development primarily focus on?
B
What users see and interact with 14
Which of these is considered a key back-end technology?
15
A developer who can manage all aspects of a web application is called a...?
16
What is considered the root element of an HTML page?
17
Which HTML tag contains meta-information about the document, like the title?
18
What is an example of an unpaired or self-closing tag?
19
Which heading tag produces the largest text?
20
The `mailto:` value in an `href` attribute is used to do what?
B
Open the user's email client 21
In an HTML table, which tag is used to define a table row?
22
How does an HTML comment begin?
23
What are the three methods for integrating CSS into HTML?
A
Local, Global, ExternalB
Inline, Internal, ExternalC
Direct, Indirect, Linked 24
Which method of integrating CSS involves using the `<style>` tag within the `<head>` section?
25
Which CSS property is used to change the family of a font?
26
To make text bold using CSS, which property would you use?
27
What is the purpose of the CSS Grid Layout?
C
To create complex layouts with rows and columnsD
To change background colors 28
In the CSS box model, what is the 'padding' property used for?
A
To create space outside the element's borderB
To create space inside the element's borderC
To set the element's widthD
To set the element's height 29
In the CSS box model, what is the 'margin' property used for?
A
To create space outside the element's borderB
To create space inside the element's borderC
To join two elements togetherD
To define the content area 30
What are CSS `@keyframes` used for?
A
To set the timing of an animationB
To define the start and end points of an animationC
To select an element to animate 31
Which programming language is primarily used to make websites interactive and dynamic?
32
Who created JavaScript in 1995?
33
In JavaScript, what keyword is commonly used to declare a variable?
34
Which of the following is NOT a basic data type in JavaScript mentioned in the text?
35
In JavaScript, what is the primary purpose of a function?
C
To reuse code and perform specific tasks 36
What is an 'onclick' in the context of HTML and JavaScript?
37
What is the purpose of the JavaScript `alert()` function?
A
To perform a calculationB
To display a popup message boxC
To change an element's style 38
The process of finding and fixing errors in your code is called...?
39
What does cross-browser testing help ensure?
A
The website loads quicklyC
The website works consistently in different browsers 40
Which HTML tag is used to create a numbered or ordered list?
41
What is the main role of HTML in web development?
C
To structure the content of the web page 42
Which popular text editor is mentioned for writing HTML code?
43
What does the `alt` attribute in an `<img>` tag provide?
A
A caption for the imageB
The alignment of the imageC
Alternate text for screen readers 44
What does CSS Flexbox help with?
C
Arranging items in a flexible and responsive wayD
Executing server-side code 45
What is a CSS transition?
A
A way to move between web pagesB
A method for making changes between styles smooth 46
What does `document.getElementById('id')` do in JavaScript?
C
Selects an element by its IDD
Changes the document title 47
What is the first step in creating a CSS animation?
48
Which of these defines a cell in an HTML table?
49
What was JavaScript initially called?
50
What is the function of the `<body>` tag in an HTML document?
A
It contains the document's title.B
It contains all the visible content of the web page.C
It links to external style sheets.D
It defines a script to be executed.