Internet and Web Technologies Quiz

Internet and Web Technologies Quiz Questions

Click here for answers

1. What is the correct HTML tag to create a heading 1?
(a)<head>
(b)<h1>
(c)<header>
(d)<section>

2. What is the purpose of thetag in HTML?
(a) To define the title of the page
(b) To provide metadata about the HTML page
(c) To create a hyperlink
(d) To define a paragraph

3. Which CSS property is used to set the font size of text?
(a) font-weight
(b) font-family
(c) font-size
(d) font-style

4. How do you select all elements with the class name “myClass” in CSS?
(a) .myClass
(b) #myClass
(c) myClass
(d) *myClass

5. Which CSS property is used to set the background image of an element?
(a) background-color
(b) background-image
(c) background-repeat
(d) background-position

6. What is the correct syntax to declare a variable in JavaScript?
(a) var x = 5;
(b) int x = 5;
(c) x = 5;
(d) declare x = 5;

7. Which JavaScript method is used to get the length of a string?
(a) length()
(b) size()
(c) count()
(d) len()

8. What is the purpose of HTTP (Hypertext Transfer Protocol)?
(a) To transfer files between computers
(b) To manage email
(c) To provide a framework for creating web pages
(d) To transfer data between web servers and web browsers

9. What is the domain name in the URL https://www.example.com?
(a) https
(b) www
(c) example.com
(d) .com

10. Which protocol is used for secure communication on the internet?
(a) HTTP
(b) FTP
(c) HTTPS
(d) SMTP

11. Which popular JavaScript framework is used for building user interfaces?
(a) React
(b) Node.js
(c) Angular
(d) Django

12. Which Python web framework is known for its rapid development and scalability?
(a) Flask
(b) Django
(c) Ruby on Rails
(d) Laravel

13. What is the primary purpose of a web framework?
(a) To provide a structured environment for building web applications
(b) To create web page layouts
(c) To manage databases
(d) To design web graphics

14. Which database management system is widely used for web applications?
(a) MySQL
(b) Microsoft Access
(c) PostgreSQL
(d) Python

15. Which HTML tag is used to define a paragraph?
(a) <p>
(b) <h1>
(c) <div>
(d) <span>

16. Which SQL statement is used to retrieve data from a database table?
(a) SELECT
(b) INSERT
(c) UPDATE
(d) DELETE

17. What is the best practice for optimizing image files for the web?
(a) Use lossy compression formats like JPEG
(b) Use lossless compression formats like PNG for images with transparency
(c) Use large image sizes to ensure quality
(d) Avoid optimizing images for performance

18. Which security vulnerability occurs when a website allows users to inject malicious scripts?
(a) SQL injection
(b) Cross-site scripting (XSS)
(c) Cross-site request forgery (CSRF)
(d) Phishing

19. What is the purpose of web accessibility?
(a) To make websites accessible to people with disabilities
(b) To improve website performance
(c) To enhance website security
(d) To create visually appealing designs

20. Which HTML attribute is used to specify an alternative text for an image, which is read by screen readers?
(a) alt
(b) title
(c) src
(d) caption

21. Which HTML attribute is used to specify the background color of a webpage?
(a) bgcolor
(b) background
(c) style
(d) color

22. Which CSS property is used to set the color of text?
(a) font-color
(b) color
(c) text-color
(d) color-text

23. What is the correct syntax for a CSS comment?
(a) /* This is a comment */
(b) // This is a comment
(c) *
(d) # This is a comment

24. Which JavaScript operator is used to compare two values for equality?
(a) ==
(b) =
(c) ===
(d) <>

25. How can you add an event listener to a button in JavaScript?
(a) button.addEventListener(“click”, myFunction);
(b) button.onclick = myFunction;
(c) button.onclicked = myFunction;
(d) button.click = myFunction;

Internet and Web Technologies Quiz Questions with Answers

1. What is the correct HTML tag to create a heading 1?
(b)<h1>

2. What is the purpose of thetag in HTML?
(b) To provide metadata about the HTML page

3. Which CSS property is used to set the font size of text?
(c) font-size

4. How do you select all elements with the class name “myClass” in CSS?
(a) .myClass

5. Which CSS property is used to set the background image of an element?
(b) background-image

6. What is the correct syntax to declare a variable in JavaScript?
(a) var x = 5;

7. Which JavaScript method is used to get the length of a string?
(a) length()

8. What is the purpose of HTTP (Hypertext Transfer Protocol)?
(d) To transfer data between web servers and web browsers

9. What is the domain name in the URL https://www.example.com?
(c) example.com

10. Which protocol is used for secure communication on the internet?
(c) HTTPS

11. Which popular JavaScript framework is used for building user interfaces?
(a) React

12. Which Python web framework is known for its rapid development and scalability?
(b) Django

13. What is the primary purpose of a web framework?
(a) To provide a structured environment for building web applications

14. Which database management system is widely used for web applications?
(a) MySQL

15. Which HTML tag is used to define a paragraph?
(a) <p>

16. Which SQL statement is used to retrieve data from a database table?
(a) SELECT

17. What is the best practice for optimizing image files for the web?
(b) Use lossless compression formats like PNG for images with transparency

18. Which security vulnerability occurs when a website allows users to inject malicious scripts?
(b) Cross-site scripting (XSS)

19. What is the purpose of web accessibility?
(a) To make websites accessible to people with disabilities

20. Which HTML attribute is used to specify an alternative text for an image, which is read by screen readers?
(a) alt

21. Which HTML attribute is used to specify the background color of a webpage?
(a) bgcolor

22. Which CSS property is used to set the color of text?
(b) color

23. What is the correct syntax for a CSS comment?
(a) /* This is a comment */

24. Which JavaScript operator is used to compare two values for equality?
(a) ==

25. How can you add an event listener to a button in JavaScript?
(a) button.addEventListener(“click”, myFunction);