wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

HTML and CSS basics

Total questions: 136

Worksheet time: 1hrs 9mins

Name
Class
Date
1.

Which CSS unit is relative to the size of the parent element's font?

a)

em

b)

%

c)

cm

d)

px

2.

Which CSS property makes the text bold?

a)

font-weight

b)

bold

c)

font-style

d)

text-bold

3.

Which CSS property changes the text color?

a)

color

b)

font-weight

c)

text-color

d)

font-style

4.

Which CSS property sets the outer spacing of an element?

a)

Border

b)

Padding

c)

Margin

d)

Spacing

5.

In CSS, how do you select all elements inside A?

a)

div.p

b)

div.p

c)

div p

d)

p div

6.

In CSS, which symbol is used before an ID selector?

a)

#

b)

.

c)

@

d)

;

7.

Which CSS property controls the space inside an element's border?

a)

Border-width

b)

Margin

c)

Padding

d)

Spacing

8.

In CSS, what does float left do?

a)

moves text to the left

b)

aligns the elements to the left side

c)

pushes elements under text

d)

makes text italic

9.

Which HTML element is used to emphasize text?

a)

<b>

b)

<strong>

c)

<em>

d)

<i>

10.

What does the tag require to display an image?

a)

src

b)

alt

c)

href

d)

src and alt

11.

Which CSS property is required to create a column grid layout?

a)

grid-template-columns

b)

grid-gap

c)

floatless

d)

display: flex;

12.

Which HTML tag is best for wrapping up stand-alone content like blog posts?

a)

<section>

b)

<article>

c)

<main>

d)

<div>

13.

Which layout model allows Argon to wrap into multiple rows automatically?

a)

float

b)

CSS Grid

c)

Flexbox

d)

inline-block

14.

Which CSS property is used to change the layout from block to inline or flex?

a)

position

b)

align

c)

float

d)

display

15.

In CSS Grid, which property defines the space between rows and columns?

a)

AlignContent

b)

GridGap

c)

JustifyItems

d)

Order

16.

Which CSS property defines space inside elements border?

a)

Border

b)

Content

c)

Margin

d)

Padding

17.

Which CSS layout uses rows and columns for content alignment?

a)

Float

b)

Inline

c)

Grid

d)

Flexbox

18.

Which tag is used to group related content in a sidebar?

a)

<aside>

b)

<section>

c)

<main>

d)

<footer>

19.

Which CSS unit is relative to the viewport to GUID?

a)

em

b)

%

c)

vw

d)

rem

20.

In CSS Flexbox, which property controls the main axis alignment?

a)

justify-content

b)

align-items

c)

align-content

d)

flex-direction

21.

Which CSS unit adapts to the size of the parent element?

a)

pm

b)

dw

c)

%

d)

px

22.

Which HTML tag is used to define the main content of a web page?

a)

<main>

b)

<section>

c)

<div>

d)

<article>

23.

Which CSS property clears floated elements?

a)

clear

b)

overflow

c)

float

d)

display

24.

Which HTML element defines navigation link?

a)

<nav>

b)

<aside>

c)

<header>

d)

<menu>

25.

Which HTML5 element is used for content that appears at the bottom of a page?

a)

<aside>

b)

<and>

c)

<bottom>

d)

<footer>

26.

Which attribute makes an image responsive in HTML?

a)

srcset

b)

scale

c)

adapt

d)

responsive

27.

Which HTML tag is best for grouping related content with a heading? Letter A, a side tag?

a)

<section>

b)

<aside>

c)

<div>

d)

<article>

28.

Which CSS property controls the stacking order of elements?

a)

z-index

b)

order

c)

float

d)

position

29.

Which HTML5 represents self-contained content that could be reused?

a)

<article>

b)

<footer>

c)

<div>

d)

<section>

30.

Which CSS properties use to fix an element at a specific place on screen while scrolling?

a)

position: fixed;

b)

display

c)

z-index

d)

float

31.

Which HTML tag is used for inline text-level semantics?

a)

<span>

b)

<div>

c)

<article>

d)

<section>

32.

Which thesis property specifies how an element is position-relative to its normal position?

a)

position: relative;

b)

float

c)

order

d)

display

33.

What does min-width in CSS Control?

a)

the padding inside the element

b)

the smallest width an element can shrink to

c)

the maximum size of an element

d)

the initial width of an element

34.

Which tag is best used for grouping headings, navigations, and logos at the top?

a)

<header>

b)

<head>

c)

<title>

d)

<section>

35.

Which HTML tags commonly used for page headers?

a)

<header>

b)

<nav>

c)

<head>

d)

<top>

36.

Which HTML element is used to create a hyperlink?

a)

<url>

b)

<href>

c)

<a>

d)

<link>

37.

What CSS property is used to change the font size of an element?

a)

size

b)

text-size

c)

font-style

d)

font-size

38.

Which HTML tag is used to define a list of items?

a)

<list>

b)

<ul>

c)

<ol>

d)

<item>

39.

Which of the following is an agile principle?

a)

Welcome changing requirements evaluated in development.

b)

Avoid continuous delivery.

c)

Minimize communication with customers.

d)

Deliver software only after full testing at the end.

40.

Which of the following is not a component of full-stack web development?

a)

Social Media Management

b)

Front-end Development

c)

Database Management

d)

Back-end Development

41.

What does HTML DOM stand for?

(a)  

42.

What is an Interrupted Programming Language?

a)

Language used for styling webpages

b)

A language that executes codes directly, without prior compilation

c)

Language compiled into machine code before execution

d)

A language that only runs often

43.

What is the function of a web server?

a)

Responds to requests by sending files to browsers.

b)

For cookies and cache

c)

Compiles programming languages

d)

Translates domain names into IP addresses

44.

What does DNS server do?

a)

Translates URLs into IP addresses

b)

Stores user login information

c)

Translates IP addresses into URLs

d)

Hosts multimedia files for websites

45.

What is the main function for web server?

a)

Translate programming languages into machine code

b)

Replace the operating system

c)

Store files on server

d)

Connect users to the contents of the internet

46.

What is a static webpage?

a)

A webpage hosted only on mobile device

b)

A webpage built from root period and HTML files

c)

A webpage that changes every time it loads

d)

A webpage built with PHP and MySQL

47.

Which request method is used by a browser to ask a server for a webpage?

a)

GetRequest

b)

Post

c)

Send

d)

FetchRequest

48.

What is a dynamic webpage?

a)

A webpage that requires server-side code to build content.

b)

A webpage inaccessible offline

c)

A webpage stored in plain text

d)

A webpage that never change

49.

Which language is commonly used for dynamic webpages?

a)

HTML

b)

XML

c)

CSS

d)

PHP

50.

What is the purpose of the API in web development?

a)

To provide an interface between database and dynamic webpages.

b)

To compile CSS into machine code

c)

To create static files

d)

To format text in HTML

51.

What is the best way to rank higher in Google Search Results?

a)

Pay Google to list your page

b)

Ask friends to link repeatedly

c)

Constantly refresh your webpage

d)

Create standard compliant user-friendly content

52.

What is WordPress mainly used for?

a)

Hosting and managing dynamic websites

b)

Programming microcontrollers

c)

Encrypting online transactions

d)

Acting as a database server

53.

What is a compiled programming language?

a)

A language translated into machine code before execution.

b)

Executed directly by the browser

c)

A markup language for styling webpages

d)

A language that runs in interpreted form

54.

What is the function of a search engine like Google?

a)

Compile programming language

b)

Create new webpages

c)

Host websites on servers

d)

To crawl and index webpages for users to search

55.

What is the waterfall model in project development management?

a)

Continuous feedback system

b)

A method where development is completed in stages before testing

c)

Iterative and incremental method

d)

Flexible sprint-based method

56.

Which software is an example of web server?

a)

GitHub

b)

Apache

c)

Chrome

d)

MySQL

57.

What does POST request do?

a)

Encrypts communication

b)

Loads scripts for dynamic webpages

c)

Asks the server to send webpage files

d)

Sends form data from browser to the server

58.

What is the purpose of version control software?

a)

To manage versions of source code and enable collaboration

b)

Monitor internet traffic

c)

Store web cookies

d)

Give passwords in your application

59.

Which of the following is an example of a web browser?

a)

Google Chrome

b)

PHP

c)

MySQL

d)

Apache

60.

Hybrid App Combines what?

a)

Native Container plus Web Technologies

b)

Server and Client Databases

c)

APIs and SDKs

d)

Desktop and Console Apps

61.

A progressive web app is best described as..

a)
  • A web app with offline, installable, and responsive capabilities

b)
  • A native iOS application only

c)
  • A desktop-only application

d)
  • A command-line mobile tool

62.

Which design approach automatically adjusts to any screen resolution?

a)

Print Design

b)

Static Design

c)

Fixed Design

d)

Responsive Design

63.

Which image format is best for scalable icons in responsive design?

a)

SVG

b)

BMP

c)

PNG

d)

JPG

64.

Bootstrap and Tailwind CSS are examples of

a)

database query languages

b)

CSS frameworks for responsive design

c)

programming languages

d)

mobile operating systems

65.

In mobile app development, which approach uses a single codebase for multiple platforms?

a)

Hybrid development

b)

Database-first development

c)

Server-side scripting

d)

Native development

66.

Which mobile OS is open source and wide use?

a)

Windows Mobile

b)

iOS

c)

Symbian

d)

Android

67.

Which unit is recommended for responsive typography?

a)

PX

b)

CM

c)

EM

d)

REM

68.

Which CSS technique is most commonly used in responsive design?

a)

server-side rendering

b)

CSS presets

c)

inline styling

d)

media queries

69.

In response to design, Flexbox and Grid are used for

a)

Authentication

b)

Database Storage

c)

Layout Management

d)

Server Deployment

70.

Which of the following is a mobile-first design principle?

a)

Ignore mobile devices

b)

Use only fixed layouts

c)

Design for mobile and enhance for larger screens

d)

Design for desktop and shrink for mobile

71.

Which is a key principle for progressive enhancement

a)

Build for basic functionality, then enhance

b)

Start with complex features first

c)

Avoid mobile users

d)

Support for only latest browsers

72.

Which is a drawback of native development that there

a)

full hardware access

b)

requires multiple codebases for platforms that there

c)

app store visibility

d)

best performance

73.

Which testing ensures a website works across different devices?

a)

Database Testing

b)

Security Testing

c)

Usability Testing

d)

Cross-Browser and Cross-Device Testing

74.

Responsive images are best implemented using

a)

Fixed With Images

b)

Using Images as Background Only

c)

Picture Type and Source Set Attributes

d)

Only .gif images

75.

What does adaptive design rely on?

a)

Predefined screen layouts for breakpoints

b)

Server logs

c)

Fluid grids only

d)

Inline CSS

76.

Which viewport metatag is essential for mobile optimization?

a)

<meta name="viewport" content="width=device-width, initial-scale=1.0">

b)

<meta http-equiv="refresh">

c)

<meta name="description">

d)

<meta charset="utf-8">

77.

What is the primary benefit of using relative units like present or EM?

a)

They adapt to parent container and screen

b)

Faster than pixels

c)

Ignore screen size

d)

Disable scaling

78.

The hamburger menu in mobile UI design is used for

a)

server caching

b)

navigation on small screens.

c)

displaying advertisements

d)

image optimization

79.

Which of the following is a native app feature?

a)

Installed directly from an app store

b)

Runs only in browsers

c)

Cannot access hardware

d)

Requires no installation

80.

The primary challenge in mobile development is

a)

Lack of programming languages

b)

No available frameworks

c)

Diverse screen sizes and hardware fragmentation

d)

Limited number of devices

81.

Which is not a characteristic of responsive design

a)

Flexible grids

b)

Scalable images

c)

Media queries

d)

Fixed pixel layouts only

82.

What does responsive design primarily aim to achieve?

a)

Faster backend processing

b)

Compatibility with all databases

c)

Replacing native apps

d)

Adapting layouts to different screen sizes

83.

Which JavaScript framework is often used in mobile app development?

a)

React Native

b)

Django

c)

Laravel

d)

Flask

84.

Which concept ensures websites are usable by people with disabilities?

a)

Accessibility

b)

Cross-platform

c)

SEO

d)

Responsiveness

85.

Which HTML element is used to display a numbered item in a list?

a)

`<ol>`

b)

`<li>`

c)

`<ul>`

d)

`<dl>`

86.

Which attribute is used to provide alternative text for an image?

a)

title

b)

src

c)

alt

d)

href

87.

The NaN in JavaScript stands for:

a)

Not a Name

b)

Not a Null

c)

Not a Number

d)

Null and None

88.

Which statement is used to exit a loop in JavaScript?

a)

stop

b)

break

c)

end

d)

return

89.

JavaScript is a ___ language.

a)

Compiled

b)

Markup

c)

Scripting

d)

Styling

90.

Which function is used to parse a string into an integer?

a)

parseInt()

b)

parseFloat()

c)

Number()

d)

eval()

91.

Which built-in method converts a string to lowercase letters?

a)

toLowerCase()

b)

lower()

c)

convertLower()

d)

toSmallCase()

92.

The function to display a message box in the browser is:

a)

print()

b)

alert()

c)

console.log()

d)

show()

93.

Which symbol is used for comments in JavaScript?

a)

<!-- comment -->

b)

// comment

c)

# comment

d)

/* comment */ only

94.

What is the output of 2 + "2" in JavaScript?

a)

4

b)

22

c)

NaN

d)

Error

95.

What is the purpose of return in a function?

a)

Stop the program

b)

Exit the function and send a value

c)

Loop back to start

d)

Define a variable

96.

What will console.log(0 == "0") output?

a)

false

b)

true

c)

undefined

d)

error

97.

JavaScript was first introduced by which company?

a)

Microsoft

b)

Sun Microsystems

c)

Netscape

d)

Apple

98.

Which keyword declares a variable that cannot be reassigned?

a)

var

b)

let

c)

const

d)

define

99.

What is a callback function?

a)

A function that calls itself

b)

A function passed as an argument to another function

c)

A function that returns multiple values

d)

A function that stops execution

100.

Which loop is guaranteed to execute at least once?

a)

for

b)

while

c)

do...while

d)

foreach

101.

What does DOM stand for?

a)

Document Object Model

b)

Data Object Management

c)

Digital Object Mapping

d)

Document Oriented Model

102.

The addEventListener() method is used to:

a)

Add HTML content

b)

Attach an event handler

c)

Create a variable

d)

Load CSS files

103.

What does JSON stand for?

a)

Java Source Object Notation

b)

JavaScript Object Notation

c)

JavaScript Oriented Network

d)

Java Simple Object Name

104.

The === operator in JavaScript checks:

a)

Value only

b)

Type only

c)

Value and type

d)

Memory reference

105.

The file extension of a JavaScript file is:

a)

.java

b)

.js

c)

.jsx

d)

.script

106.

What will typeof null return?

a)

“null”

b)

“object”

c)

“undefined”

d)

“string”

107.

Which of the following is NOT a JavaScript data type?

a)

String

b)

Boolean

c)

Character

d)

Number

108.

Which of the following methods adds an element at the end of an array?

a)

push()

b)

pop()

c)

shift()

d)

unshift()

109.

What will console.log(0 === "0") output?

a)

false

b)

true

c)

error

110.

Inside which HTML element do we put JavaScript code?

a)

<javascript>

b)

<script>

c)

<js>

d)

<code>

111.

JavaScript was originally developed by:

a)

Brendan Eich

b)

Tim Berners-Lee

c)

Dennis Ritchie

d)

James Gosling

112.

Which framework allows you to create mobile apps using JavaScript?

a)

Bootstrap

b)

React Native

c)

Deno

d)

Next.js

113.

The term “two-way data binding” means:

a)

UI updates automatically when data changes and vice versa

b)

Only data updates the UI

c)

Only UI updates the data

d)

Data flow is unidirectional

114.

Axios is commonly used in JavaScript to:

a)

Style components

b)

Handle HTTP requests

c)

Connect databases

d)

Create components

115.

Express.js is mainly used for:

a)

Building APIs and web servers

b)

Managing databases

c)

Front-end design

d)

DOM manipulation

116.

Vue.js was created by:

a)

Evan You

b)

Brendan Eich

c)

Tim Berners-Lee

d)

Ryan Dahl

117.

The syntax `$(document).ready()` is associated with:

a)

React

b)

Angular

c)

jQuery

d)

Node.js

118.

Angular was created and maintained by:

a)

Facebook

b)

Google

c)

Apple

d)

Adobe

119.

Virtual DOM is primarily used in:

a)

Vue.js only

b)

AngularJS only

c)

React and Vue

d)

jQuery

120.

Vue.js templates use which delimiters by default?

a)

{{ }}

b)

[[ ]]

c)

<% %>

d)

<< >>

121.

Which of the following is NOT a JavaScript library or framework?

a)

React

b)

Angular

c)

Laravel

d)

Vue

122.

React was developed by:

a)

Google

b)

Facebook (Meta)

c)

Microsoft

d)

Mozilla

123.

In Angular, components are written using:

a)

HTML only

b)

TypeScript

c)

PHP

d)

XML

124.

Next.js is built on top of:

a)

Angular

b)

Node.js

c)

React

d)

Vue.js

125.

Lodash is a JavaScript library mainly for:

a)

Utility functions and array/object manipulation

b)

Form validation

c)

API authentication

d)

DOM rendering

126.

The command to create a new React project using Create React App is:

a)

npm install react

b)

npm create react-app myApp

c)

npx create-react-app myApp

d)

node create-react-app myApp

127.

jQuery simplifies:

a)

HTML DOM manipulation and AJAX

b)

Server deployment

c)

Database queries

d)

Image rendering

128.

Which React hook replaces lifecycle methods like `componentDidMount`?

a)

useRef

b)

useEffect

c)

useState

d)

useContext

129.

Node.js uses which runtime engine?

a)

SpiderMonkey

b)

Chakra

c)

V8

d)

Rhino

130.

Which statement is true about React?

a)

It’s an MVC framework

b)

It focuses on building user interfaces using components

c)

It runs only on the server

d)

It uses two-way data binding by default

131.

Which Node.js framework is used for real-time applications (like chat)?

a)

Express

b)

Next.js

d)

React Native

132.

A JavaScript library is best described as:

a)

A complete programming language

b)

A collection of prewritten JavaScript code for common tasks

c)

A database driver

d)

A hardware abstraction layer

133.

Which library is most associated with state management in React?

a)
  • Redux

b)

Axios

c)

Lodash

d)

Mongoose

134.

The command `npm install` is used to:

a)

Start the Node server

b)

Install project dependencies

c)

Build the React project

d)

Run JavaScript tests

135.

Node.js allows JavaScript to run on:

a)

Only browsers

b)

Mobile devices

c)

The server side

d)

Game consoles only

136.

The main building blocks of an Angular app are:

a)

Functions

b)

Components

c)

APIs

d)

Hooks