0% found this document useful (0 votes)
24 views2 pages

Web Development Quiz: HTML, CSS, JS, PHP

The document contains a series of multiple-choice questions related to web development concepts, including PHP, HTML, CSS, and JavaScript. It covers topics such as variable declaration, HTML tags for hyperlinks and images, CSS properties, and JavaScript functions. The questions test knowledge on the purpose and syntax of various web development elements.

Uploaded by

4somepic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views2 pages

Web Development Quiz: HTML, CSS, JS, PHP

The document contains a series of multiple-choice questions related to web development concepts, including PHP, HTML, CSS, and JavaScript. It covers topics such as variable declaration, HTML tags for hyperlinks and images, CSS properties, and JavaScript functions. The questions test knowledge on the purpose and syntax of various web development elements.

Uploaded by

4somepic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1. What is the purpose of the echo command in A.

color
PHP?
B. background-color
A. To execute PHP scripts

B. To display output in the browser C. bg-color

C. To stop script execution D. bgColor


D. To delete a variable

8. What is the main purpose of HTML in web


2. How do you declare a variable in PHP? development?
A. $variable = "value";
A. To style web pages
B. var variable = "value";
B. To create the structure of web pages
C. let variable = "value";
C. To manage server databases
D. variable := "value";
D. To add interactive features

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

A. <link> 9. Which HTML tag is used to insert an image?

B. <a> A. <image>

C. <href> B. <img>

D. <hyperlink> C. <picture>

4. What does CSS stand for? D. <photo>

A. Color Style Sheets

B. Computer Style Sheets 10. In CSS, which property is used to set the text
color?
C. Cascading Style Sheets
A. background-color
D. Creative Style Sheets
B. color

C. text-color
5. Which JavaScript function is used to display a
message box in the browser? D. font-color

A. alert()

B. display() 11. What is the correct HTML element for the


largest heading?
C. message()
A. <heading>
D. show()
B. <h6>

C. <h1>
6. What is the correct way to include an external
JavaScript file in HTML? D. <head>

A. <script src="file.js"></script>

B. <javascript src="file.js"></javascript> 12. Which HTML tag is used for a line break?

C. <script href="file.js"></script> A. <break>

D. <js src="file.js"></js> B. <lb>

C. <br>

7. Which of the following properties is used to D. <newline>


change the background color in CSS?
B. <ol>

13. What is the correct CSS syntax to make all C. <li>


paragraph text bold?
D. <list>
A. font-weight: bold;

B. text-weight: bold;
19. What is the main function of CSS in web
C. style: bold; development?

D. text-bold: true; A. To create interactive features on the


website

B. To define the structure of web content


14. Which of the following is a JavaScript data
type? C. To style and layout web content

A. String D. To manage databases on the web server

B. Element

C. Document 20. What is the purpose of the <meta


charset="UTF-8"> tag in HTML?
D. Link
A. To set the page title

B. To change the background color of the page


15. Which attribute is used to open a link in a new
tab in HTML? C. To specify the character set for the
webpage
A. newtab="true"
D. To add a hyperlink to the page
B. target="_blank"

C. open="newtab"
21. What will console.log(3 == '3'); return?
D. tab="new"
a) true
b) false
c) null
16. What is the purpose of the <title> tag in HTML? d) undefined

A. To set the title of a paragraph 22. What does the float property do in CSS?

B. To display the main heading of the page a) Positions an element relative to its parent.

C. To specify the title for the browser tab b) Floats an element to the left or right of its
container.
D. To style the content
c) Centers an element vertically.

d) Moves an element to the top of the page.


17. Which HTML attribute is used to specify the
URL of an image file?

A. src 23. Which of the following is the correct syntax to


select an element with the class "button"?
B. href
a) #button
C. link
b) .button
D. file
c) button.

d) class.button
18. Which of the following HTML tags is used to
create an ordered list?

A. <ul>

You might also like