computer MCQs

9th • Chapter 08

50 Questions TextBook
1

Who is credited with creating HTML in 1991?

A
Brendan Eich
B
Sabeer Bhatia
C
Tim Berners-Lee
D
Jack Smith
2

What does CSS stand for?

A
Creative Style Sheets
B
Cascading Style Sheets
C
Computer Style Sheets
D
Colorful Style Sheets
3

Which HTML tag is used to create a hyperlink?

A
<a>
B
<link>
C
<href>
D
<nav>
4

Which CSS property is used to change the background color of an element?

A
color
B
bgcolor
C
background-color
D
background
5

Which HTML attribute is used to define inline styles?

A
font
B
class
C
style
D
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?

A
/* */
B
<!-- -->
C
//
D
**
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?

A
<ol>
B
<li>
C
<list>
D
<ul>
10

Which tag is used to display a horizontal line in HTML?

A
<br>
B
<hr>
C
<line>
D
<hline>
11

Which of the following is NOT a correct HTML tag according to the text?

A
<div>
B
<span>
C
<head>
D
<nav>
12

Which HTML version, released in 2014, is the latest version mentioned in the text?

A
HTML 4.01
B
HTML 3.2
C
HTML5
D
HTML 2.0
13

What does front-end development primarily focus on?

A
Databases and servers
B
What users see and interact with
C
Application logic
D
Server management
14

Which of these is considered a key back-end technology?

A
CSS
B
HTML
C
Databases
D
JavaScript
15

A developer who can manage all aspects of a web application is called a...?

A
Front-end developer
B
Back-end developer
C
Web designer
D
Full-stack developer
16

What is considered the root element of an HTML page?

A
<body>
B
<html>
C
<head>
D
<!DOCTYPE html>
17

Which HTML tag contains meta-information about the document, like the title?

A
<meta>
B
<body>
C
<head>
D
<html>
18

What is an example of an unpaired or self-closing tag?

A
<p>
B
<h1>
C
<div>
D
<img>
19

Which heading tag produces the largest text?

A
<h6>
B
<h3>
C
<h1>
D
<h4>
20

The `mailto:` value in an `href` attribute is used to do what?

A
Go to a new webpage
B
Open the user's email client
C
Link to a map
D
Mail a letter
21

In an HTML table, which tag is used to define a table row?

A
<td>
B
<th>
C
<tr>
D
<table>
22

How does an HTML comment begin?

A
//
B
/*
C
<!--
D
<comment>
23

What are the three methods for integrating CSS into HTML?

A
Local, Global, External
B
Inline, Internal, External
C
Direct, Indirect, Linked
D
Style, Link, Script
24

Which method of integrating CSS involves using the `<style>` tag within the `<head>` section?

A
Inline
B
External
C
Internal
D
Linked
25

Which CSS property is used to change the family of a font?

A
font-style
B
font-weight
C
font-family
D
text-family
26

To make text bold using CSS, which property would you use?

A
font-weight: bold;
B
font-style: bold;
C
text-decoration: bold;
D
bold: true;
27

What is the purpose of the CSS Grid Layout?

A
To add animations
B
To style text fonts
C
To create complex layouts with rows and columns
D
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 border
B
To create space inside the element's border
C
To set the element's width
D
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 border
B
To create space inside the element's border
C
To join two elements together
D
To define the content area
30

What are CSS `@keyframes` used for?

A
To set the timing of an animation
B
To define the start and end points of an animation
C
To select an element to animate
D
To link a stylesheet
31

Which programming language is primarily used to make websites interactive and dynamic?

A
HTML
B
CSS
C
Python
D
JavaScript
32

Who created JavaScript in 1995?

A
Tim Berners-Lee
B
Brendan Eich
C
Sabeer Bhatia
D
Tim Berners-Lee
33

In JavaScript, what keyword is commonly used to declare a variable?

A
let
B
const
C
var
D
All of the above
34

Which of the following is NOT a basic data type in JavaScript mentioned in the text?

A
String
B
Number
C
Float
D
Boolean
35

In JavaScript, what is the primary purpose of a function?

A
To store data
B
To style elements
C
To reuse code and perform specific tasks
D
To declare variables
36

What is an 'onclick' in the context of HTML and JavaScript?

A
A CSS property
B
An HTML tag
C
An HTML event
D
A JavaScript data type
37

What is the purpose of the JavaScript `alert()` function?

A
To perform a calculation
B
To display a popup message box
C
To change an element's style
D
To create a variable
38

The process of finding and fixing errors in your code is called...?

A
Deploying
B
Testing
C
Commenting
D
Debugging
39

What does cross-browser testing help ensure?

A
The website loads quickly
B
The code has no errors
C
The website works consistently in different browsers
D
The website is secure
40

Which HTML tag is used to create a numbered or ordered list?

A
<ul>
B
<ol>
C
<li>
D
<dl>
41

What is the main role of HTML in web development?

A
To style the web page
B
To add interactivity
C
To structure the content of the web page
D
To manage the database
42

Which popular text editor is mentioned for writing HTML code?

A
Microsoft Word
B
Notepad++
C
Adobe Photoshop
D
Google Docs
43

What does the `alt` attribute in an `<img>` tag provide?

A
A caption for the image
B
The alignment of the image
C
Alternate text for screen readers
D
The image source URL
44

What does CSS Flexbox help with?

A
Creating 3D graphics
B
Managing databases
C
Arranging items in a flexible and responsive way
D
Executing server-side code
45

What is a CSS transition?

A
A way to move between web pages
B
A method for making changes between styles smooth
C
A type of font
D
A JavaScript function
46

What does `document.getElementById('id')` do in JavaScript?

A
Creates a new element
B
Deletes an element
C
Selects an element by its ID
D
Changes the document title
47

What is the first step in creating a CSS animation?

A
Apply the animation
B
Define Keyframes
C
Set loop and timing
D
Define the hover state
48

Which of these defines a cell in an HTML table?

A
<tr>
B
<th>
C
<td>
D
<caption>
49

What was JavaScript initially called?

A
Java
B
LiveScript
C
Mocha
D
TypeScript
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.