Font size
WorksheetsHTML5, CSS3, Bootstrap, and JavaScript Quiz
Total questions: 100
Worksheet time: 1hrs 10mins
What does HTML5 stand for?
Hyper Transfer Markup Language
Hyper Text Markup Language 5
High Text Machine Language
Hyper Text Managing Links
Which HTML5 API is used for storing data on the client side?
Web Storage API
Local API
SQL API
Web Worker API
6. What is the purpose of the <canvas> element in HTML5?
To display database records
To create graphics using JavaScript
To embed videos
To define the layout of a page
7. Which attribute is used in <audio> and <video> elements to display controls?
controls
autoplay
display
visible
Which HTML5 API allows a web page to run scripts in the background independently?
WebSocket API
Web Worker API
Geolocation API
Web Storage API
What does CSS stand for?
Computer Style Sheets
Creative Style Sheets
Cascading Style Sheets
Colorful Style Sheets
Which of the following is a valid CSS3 transition property?
transition-effect
transition-duration
animation
transform
Which CSS3 property is used to create rounded corners?
border-radius
corner-round
radius-border
border-style
Which CSS3 feature is used for making a website responsive?
Gradients
Flexbox
Transform
Text Shadows
Which property is used to add shadows to elements in CSS3?
box-shadow
shadow-effect
element-shadow
text-shadow
Which of the following is a valid CSS3 pseudo-class?
:hover
:click
:selected
:pressed
Which unit is relative to the viewport size in CSS3?
em
px
vh
pt
Which CSS3 property is used for creating animations?
animation
motion
transition
animate
What is Bootstrap?
A JavaScript framework
A CSS framework
A PHP framework
A Python framework
Which Bootstrap class is used to create a responsive container?
.container-fluid
.container-responsive
.container-fixed
.container
Which of the following is the latest Bootstrap version? (As of 2025)
Bootstrap 3
Bootstrap 4
Bootstrap 5
Bootstrap 6
Which Bootstrap class is used to create a button?
.btn
.button
.btn-group
.button-style
Which of the following is NOT a valid Bootstrap grid class?
.col-md-6
.col-lg-4
.col-xl-3
.col-xs-5
Which Bootstrap class is used to make an image responsive?
.img-responsive
.responsive-img
.img-fluid
.image-resize
Which Bootstrap component is used for creating a navigation bar?
.nav-menu
.navbar
.nav-bar
.navigation
Which Bootstrap class is used to create a flexbox container?
.d-flex
.flex-box
.box-flex
.display-flex
Which Bootstrap class is used to create a card component?
.card
.panel
.box
.container-card
Which of the following is the correct syntax for referring to an external JavaScript file?
<script href="script.js"></script>
<script name="script.js"></script>
<script src="script.js"></script>
<script file="script.js"></script>
Which keyword is used to declare a variable in JavaScript?
var
let
const
All of the above
Which function is used to display an alert box in JavaScript?
alertBox()
msgBox()
alert()
message()
Which operator is used for strict comparison (checks both value and type)?
==
===
!=
!==
How do you write a function in JavaScript?
function = myFunction()
function myFunction() { }
def myFunction() { }
func myFunction() { }
Which JavaScript method is used to find the length of a string?
length()
strlen()
size()
length
Which of the following is not a JavaScript data type?
String
Boolean
Float
Undefined
What will console.log(typeof null) output?
"null"
"undefined"
"object"
"string"
Which JavaScript function is used to parse a JSON string into an object?
JSON.parse()
JSON.stringify()
parseJSON()
stringifyJSON()
What does DOM stand for in JavaScript?
Document Oriented Model
Data Object Model
Document Object Model
Dynamic Object Model
Which object is the root of the DOM hierarchy?
window
document
html
element
Which method is used to select an element by its ID?
getElementByClassName()
getElementById()
getElementByTagName()
querySelectorAll()
Which JavaScript method is used to change the content of an HTML element?
document.write()
document.getElementById().innerHTML
document.changeHTML()
document.modify()
Which method is used to add an event listener to an element?
addEventListener()
attachEvent()
setEvent()
onEvent()
Which method is used to create a new HTML element using JavaScript?
createElement()
newElement()
appendElement()
makeElement()
How do you remove an element from the DOM?
removeChild()
deleteElement()
eraseNode()
removeElement()
Which property returns the parent node of an element?
parentNode
rootNode
parentElement
ancestorNode
Which method is used to select elements using CSS selectors?
getElementBySelector()
querySelector()
selectElement()
findElement()
Which DOM property is used to change the style of an element?
element.style
element.css
element.setStyle
element.modifyStyle
is used to change the style of an element?
element.style
element.css
element.setStyle
element.modifyStyle
What does AJAX stand for?
Asynchronous JavaScript and XML
Advanced Java and XML
Asynchronous JavaScript and XHTML
Automated Java and XML
Which object is used in JavaScript for AJAX requests?
HttpRequest
XMLHttpRequest
AJAXRequest
FetchRequest
Which method is used to send an AJAX request in JavaScript?
fetch()
sendRequest()
postRequest()
makeRequest()
Which HTTP method is used for sending data in an AJAX request?
GET
POST
Both a and b
SEND
Which property of XMLHttpRequest holds the response data?
responseText
responseXML
responseData
getResponse()
What is jQuery?
A JavaScript framework
A JavaScript library
A CSS framework
A programming language
Which symbol is used to access jQuery?
@
#
$
&
Which jQuery function is used to perform AJAX requests?
$.ajax()
$.get()
$.post()
All of the above
How do you select an element with the class name "box" in jQuery?
$(".box")
$("#box")
$class("box")
$("box")
Which jQuery function is used to hide an element?
hideElement()
invisible()
removeElement()
hide()
What does PHP stand for?
Personal Home Page
Preprocessed Hypertext Processor
PHP: Hypertext Preprocessor
Private Hosting Protocol
Which symbol is used to start a PHP variable?
#
$
&
@
Which function is used to print output in PHP?
echo
display
Both a and c
Which of the following is the correct way to start a PHP script?
?>
Which PHP function is used to connect to a MySQL database?
connect_db()
mysqli_connect()
db_connect()
mysql_link()
Which superglobal variable is used to collect form data?
$_FORM
$_GET
$_POST
Both b and c
Which function is used to include a PHP file in another file?
include()
require()
import()
Both a and b
Which of the following is used to start a session in PHP?
session_start();
start_session();
init_session();
begin_session();
Which function is used to terminate a script execution in PHP?
exit()
stop()
terminate()
die()
Which of the following PHP functions is used to retrieve the length of a string?
length()
strlen()
strlength()
size()
What is Node.js?
A JavaScript library
A JavaScript runtime environment
A JavaScript framework
A JavaScript compiler
Which engine does Node.js use to execute JavaScript?
SpiderMonkey
Chakra
V8
Rhino
Which of the following is a built-in module in Node.js?
http
express
mongoose
react
Which command is used to initialize a new Node.js project?
npm install
node init
npm init
node install
Which of the following is the default package manager for Node.js?
npm
yarn
bower
composer
Which of the following is used to handle asynchronous operations in Node.js?
Promises
Callbacks
Async/Await
All of the above
Which module in Node.js is used for handling file system operations?
fs
fileSystem
os
path
How do you import a module in Node.js?
import module from 'module';
require('module');
include('module');
load('module');
Which method is used to create a server in Node.js?
http.createServer()
server.create()
net.createHttpServer()
express.createServer()
Which event is emitted when a stream has been fully read in Node.js?
end
close
finish
done
What is TypeScript?
A programming language based on Python
A superset of JavaScript
A runtime for JavaScript
A framework for building JavaScript applications
Which of the following is a valid TypeScript file extension?
.ts
.js
.tsx
Both a and c
Which command is used to install TypeScript globally using npm?
npm install -g typescript
npm install typescript
tsc install typescript
node install -g typescript
How do you define a variable with a specific type in TypeScript?
let age: number = 25;
let age = number(25);
let number age = 25;
int age = 25;
Which TypeScript feature allows defining custom types?
Interfaces
Modules
Classes
All of the above
Which TypeScript keyword is used to create a constant variable?
var
let
const
static
How do you compile a TypeScript file into JavaScript?
tsc filename.ts
compile filename.ts
ts filename.ts
node filename.ts
Which TypeScript feature helps detect errors at compile-time?
Static typing
Dynamic typing
Loose typing
None of the above
Which of the following is NOT a valid TypeScript type?
boolean
any
void
text
How do you define an interface in TypeScript?
interface Person { name: string; age: number; }
type Person { name: string; age: number; }
struct Person { name: string; age: number; }
object Person { name: string; age: number; }
What is Angular?
A JavaScript library for building UI
A JavaScript framework for single-page applications (SPAs)
A database management system
A CSS framework
Which command is used to create a new Angular project?
ng create myApp
ng new myApp
angular new myApp
npm new myApp
Which file is the entry point of an Angular application?
index.html
main.ts
app.module.ts
package.json
Which directive is used for two-way data binding in Angular?
[(ngModel)]
[ngModel]
{{ngModel}}
ngDataBind
Which Angular module is used for routing?
RouterModule
FormsModule
HttpClientModule
RoutingModule
Which of the following is NOT a valid Angular directive?
*ngIf
*ngFor
*ngSwitch
*ngRoute
Which decorator is used to define an Angular component?
@NgComponent
@Component
@Directive
@Injectable
Which service is used for HTTP requests in Angular?
HttpModule
HttpClientModule
HttpService
HttpRequestService
Which lifecycle hook is called after a component is initialized?
ngOnInit()
ngAfterViewInit()
ngDoCheck()
ngDestroy()
Which of the following is used for dependency injection in Angular?
@Injectable
@Inject
Providers
All of the above
Define HTML5.
Define Ajax.
What are the various features of NODE JS?
Write the syntax for typescript Interface?
What are Components and Modules in Angular CLI?
What do you mean by Dependency Injection in Angular?
What are Reactive Forms?
Define Cookies and Session in PHP?
