Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

MCQ Farah Toumi

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 17

1. What does HTML stand for?

a) Hyper Text Markup Language

b) High Tech Markup Language

c) Hyperlink Text Markup Language

d) Home Tool Markup Language

Answer: a) Hyper Text Markup Language

2. Which technology is primarily responsible for the styling of web pages?

a) JavaScript

b) HTML

c) CSS

d) Python

Answer: c) CSS

3. What does CSS stand for?

a) Creative Style Sheets

b) Cascading Style Sheets

c) Computer Style Sheets

d) Custom Style Sheets

Answer: b) Cascading Style Sheets

4. Which programming language is mainly used for adding interactivity to websites?

a) HTML

b) CSS

c) Python

d) JavaScript

Answer: d) JavaScript

5. What is the purpose of a front-end web development framework like React or Angular?
a) To manage databases and server-side logic

b) To create a visually appealing user interface

c) To handle server-side routing

d) To interact with web servers

Answer: b) To create a visually appealing user interface

6. Which part of web development is responsible for handling data storage and retrieval?

a) Front-end development

b) Back-end development

c) Full-stack development

d) Middleware development

Answer: b) Back-end development

7. What is the primary function of a web server in the context of web development?

a) Rendering web pages on the client's browser

b) Executing JavaScript code

c) Storing user data

d) Handling HTTP requests and serving web pages

Answer: d) Handling HTTP requests and serving web pages

8. Which of the following is not a back-end programming language commonly used in web
development?

a) PHP

b) Ruby

c) Java

d) HTML

Answer: d) HTML
9. Which type of web development allows for both front-end and back-end development using a
single language?

a) Full-stack development

b) Cross-platform development

c) Multi-language development

d) Hybrid development

Answer: a) Full-stack development

10. What is the purpose of the <script> tag in HTML?

a) To define the page's structure

b) To include external CSS styles

c) To include external JavaScript code

d) To create hyperlinks

Answer: c) To include external JavaScript code

11. What is the correct syntax for creating a CSS class called "highlight" with a red text color?

a) .highlight { color: red; }

b) highlight { text-color: red; }

c) .highlight { text-color: red; }

d) highlight { color: red; }

Answer: a) .highlight { color: red; }

12. Which HTML tag is used to create a hyperlink?

a) <a>

b) <link>

c) <h1>

d) <p>

Answer: a) <a>
13. What is the purpose of the "alt" attribute in an <img> tag?

a) It specifies the alignment of the image

b) It provides alternative text if the image fails to load ( additional description of the image ).

c) It sets the size of the image

d) It defines the image source

Answer: b) It provides alternative text if the image fails to load

14. Which CSS property is used to control the spacing between elements in a layout?

a) padding

b) margin

c) spacing

d) border

Answer: b) margin

15. Which of the following is a popular front-end development framework maintained by


Google?

a) React

b) Angular

c) Vue.js

d) Django

Answer: b) Angular

16. Which of the following is a server-side scripting language commonly used for web
development?

a) HTML

b) CSS

c) Python

d) JavaScript

Answer: c) Python
17. What is the purpose of the "form" element in HTML?

a) It defines a hyperlink

b) It creates a container for metadata

c) It allows users to input data and submit it to the server

d) It defines a section in a document

Answer: c) It allows users to input data and submit it to the server

18. Which CSS property is used to change the font size of text?

a) font-size

b) text-size

c) font-style

d) text-style

Answer: a) font-size

19. What is the role of a CSS preprocessor in web development?

a) To convert HTML code into CSS

b) To compress CSS files for faster loading

c) To add interactivity to web pages

d) To extend the capabilities of CSS with variables and functions

Answer: d) To extend the capabilities of CSS with variables and functions

20. Which of the following is used to store and query data in a tabular format in web
development?

a) Database

b) API

c) JSON

d) XML

Answer: a) Database
21. What does the acronym "REST" stand for in the context of web development?

a) Representational State Transfer

b) Responsive Elements for Seamless Transition

c) Readable Element Style Transfer

d) Real-time Server Technology

Answer: a) Representational State Transfer

22. Which JavaScript function is used to change the content of an HTML element?

a) modify()

b) change()

c) update()

d) innerHTML()

Answer: d) innerHTML()

23. In a URL, what does the domain name represent?

a) The type of website (e.g., .com, .org)

b) The name of the web developer

c) The address of the web server hosting the website

d) The title of the web page

Answer: c) The address of the web server hosting the website

24. Which HTTP method is typically used to retrieve data from a web server?

a) GET

b) POST

c) PUT

d) DELETE

Answer: a) GET
25. Which of the following is an example of a front-end web development framework/library?

a) Express.js

b) Django

c) Flask

d) React.js

Answer: d) React.js

26. What is the purpose of the "cookie" in web development?

a) To store data on the client's browser for future use

b) To encrypt sensitive information during transmission

c) To handle server-side logic

d) To create user authentication systems

Answer: a) To store data on the client's browser for future use

27. Which HTML tag is used to define a table in web development?

a) <table>

b) <div>

c) <form>

d) <img

>

Answer: a) <table>

28. Which of the following is NOT a commonly used web development framework for Python?

a) Flask

b) Django

c) Express.js

d) Pyramid

Answer: c) Express.js
29. What is the purpose of the "viewport" meta tag in HTML?

a) To define the color palette for the web page

b) To set the width and initial scale of the web page for different devices

c) To define the font style and size

d) To specify the default language of the web page

Answer: b) To set the width and initial scale of the web page for different devices

30. Which CSS property is used to create rounded corners for an HTML element?

a) border-radius

b) corner-radius

c) rounded-corners

d) box-radius

Answer: a) border-radius

*Which of the following technologies is primarily used for defining the structure and content
of a webpage?

a) HTML

b) CSS

c) JavaScript

d) All of the above

Answer:

a) HTML

Question 1:

What is the primary purpose of CSS (Cascading Style Sheets)?

a) Define the structure and content of a webpage

b) Add interactivity to a webpage


c) Control the presentation and layout of a webpage

d) Execute server-side logic

Answer:

c) Control the presentation and layout of a webpage

Question 2:

Which HTML tag is used to link an external JavaScript file to an HTML document?

a) <script>

b) <link>

c) <js>

d) <javascript>

Answer:

a) <script>

Question 3:

In CSS, what property is used to change the text color of an element?

a) text-color

b) color
c) font-color

d) text-style

Answer:

b) color

Question 4:

Which HTML tag is used to create an unordered list?

a) <list>

b) <ul>

c) <ol>

d) <li>

Answer:

b) <ul>

Question 5:

In JavaScript, what is the purpose of the document.getElementById() method?

a) Retrieve an HTML element by its class name

b) Retrieve an HTML element by its tag name


c) Retrieve an HTML element by its ID

d) Retrieve an HTML element by its name attribute

Answer:

c) Retrieve an HTML element by its ID

Question 6:

Which CSS property is used to control the space between the elements' borders?

a) margin

b) padding

c) border-spacing

d) spacing

Answer:

a) margin

Question 7:

What does the acronym "HTML" stand for?

a) HyperText Markup Language

b) High-Level Text Management Language


c) HyperTransfer Markup Language

d) HyperText Management Language

Answer:

a) HyperText Markup Language

Question 8:

In JavaScript, what does the typeof operator do?

a) Returns the data type of a variable

b) Checks if a variable is defined

c) Converts a variable to a string

d) Compares two variables

Answer:

a) Returns the data type of a variable

Question 9:

Which HTML tag is used to create a hyperlink?

a) <link>

b) <href>
c) <a>

d) <hyperlink>

Answer:

c) <a>

Question 10:

What is the purpose of the CSS display: none; property?

a) Hides the element

b) Makes the element visible

c) Sets the element's background color to none

d) Clears the element's content

Answer:

a) Hides the element

Question 11:

In JavaScript, which of the following is used to declare a variable?

a) variable

b) var
c) declare

d) let

Answer:

b) var

Question 12:

What is the purpose of the HTML <head> element?

a) Defines the main content of a webpage

b) Contains metadata about the document

c) Specifies the structure of a webpage

d) Represents the body of the document

Answer:

b) Contains metadata about the document

Question 13:

In CSS, what does the z-index property control?

a) Element's width

b) Element's height
c) Element's position in the stacking order

d) Element's color

Answer:

c) Element's position in the stacking order

Question 14:

Which HTML tag is used to define an inline style?

a) <style>

b) <css>

c) <inlinestyle>

d) <link>

Answer:

a) <style>

Question 15:

In JavaScript, what is the purpose of the setTimeout() function?

a) Executes a function after a specified delay

b) Repeats a function at regular intervals

c) Pauses the execution of the script

d) Stops the execution of the script


Answer:

a) Executes a function after a specified delay

Question 16:

What does the CSS property float: left; do?

a) Aligns an element to the right

b) Aligns an element to the left

c) Centers an element

d) Removes an element from the document flow

Answer:

b) Aligns an element to the left

Question 17:

Which of the following is NOT a valid way to include JavaScript in an HTML


document?

a) <script src="script.js"></script>

b) <javascript>...</javascript>
c) <script>...</script>

d) onclick="myFunction()"

Answer:

b) <javascript>...</javascript>

Question 18:

What does the CSS property position: relative; do?

a) Positions an element relative to its normal position

b) Positions an element absolutely within its nearest positioned ancestor

c) Removes an element from the document flow

d) Centers an element on the page

Answer:

a) Positions an element relative to its normal position

You might also like