IP Contents of BP

You might also like

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

1.

Which of the following programming languages is commonly used for front-end web
development?

a) Java

b) Python

c) HTML

d) PHP

Answer: c) HTML

2. Which term refers to the process of adapting a website's layout to fit different screen sizes and
devices?

a) Responsiveness

b) Browser compatibility

c) Search engine optimization

d) Back-end development

Answer: a) Responsiveness

3. Which of the following is an example of a CSS framework?

a) jQuery

b) Bootstrap

c) Node.js

d) AngularJS

Answer: b) Bootstrap

4. What does the term "SEO" stand for in web development?

a) Secure Encoding Operations

b) Server Enhancement Options


c) Search Engine Optimization

d) Social Engagement Outreach

Answer: c) Search Engine Optimization

5. Which term refers to the process of combining and minifying multiple CSS or JavaScript files
into a single file?

a) Bundling

b) Parsing

c) Debugging

d) Caching

Answer: a) Bundling

6. Which protocol is commonly used to transfer data between a web server and a web browser?

a) HTTP

b) FTP

c) SMTP

d) DNS

Answer: a) HTTP

7. Which term refers to the process of converting a website design into a functioning web page?

a) Wireframing

b) Prototyping

c) Front-end development

d) Back-end development

Answer: c) Front-end development


8. Which term refers to the process of storing data on a user's computer to remember information
between website visits?

a) Caching

b) Cookies

c) Sessions

d) Local storage

Answer: b) Cookies

9. Which of the following is an example of a content management system (CMS)?

a) WordPress

b) Git

c) Django

d) Ruby on Rails

Answer: a) WordPress

10. Which term refers to the process of analyzing and improving a website's performance,
accessibility, and user experience?

a) User interface design

b) Quality assurance

c) Website optimization

d) Database administration

Answer: c) Website optimization

1. Which of the following is a markup language used to structure the content of a web page?

a) HTML
b) CSS

c) JavaScript

d) PHP

Answer: a) HTML

2. What does CSS stand for in web development?

a) Cascading Style Sheets

b) Centralized Server System

c) Client-Side Scripting

d) Content Management System

Answer: a) Cascading Style Sheets

3. Which HTML tag is used to define the main heading of a web page?

a) <body>

b) <header>

c) <h1>

d) <title>

Answer: c) <h1>

4. Which CSS property is used to change the color of text?

a) font-color

b) text-style

c) color

d) text-color

Answer: c) color
5. Which of the following is NOT a valid way to include JavaScript in an HTML file?

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

b) <javascript src="script.js"></javascript>

c) <script>alert("Hello, World!");</script>

d) <a href="script.js"></a>

Answer: b) <javascript src="script.js"></javascript>

6. Which CSS property is used to create space between the content and the border of an element?

a) padding

b) margin

c) spacing

d) border-spacing

Answer: a) padding

7. Which JavaScript function is used to change the text of an HTML element?

a) setHTML()

b) changeText()

c) innerHTML()

d) setText()

Answer: c) innerHTML()

8. Which CSS selector targets an element with a specific class name?

a) #

b) .
c) *

d) %

Answer: b) .

9. Which HTML tag is used to create an unordered list?

a) <ol>

b) <li>

c) <ul>

d) <list>

Answer: c) <ul>

10. Which JavaScript method is used to add an event listener to an HTML element?

a) addEventListener()

b) onClick()

c) listen()

d) attachEvent()

Answer: a) addEventListener()

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

a) font-size

b) text-size

c) size

d) font-style

Answer: a) font-size
12. Which HTML tag is used to create a hyperlink?

a) <link>

b) <a>

c) <href>

d) <url>

Answer: b) <a>

13. Which CSS property is used to align text to the center of an element?

a) text-align

b) align-text

c) center-text

d) text-center

Answer: a) text-align

14. Which JavaScript method is used to retrieve the value of an input field?

a) getValue()

b) retrieveValue()

c) getElementValue()

d) value

Answer: d) value

15. Which HTML tag is used to display an image on a web page?

a) <image>

b) <img>

c) <picture>
d) <src>

Answer: b) <img>

16. Which CSS property is used to create a border around an element?

a) border

b) border-style

c) border-width

) border-color

Answer: a) border

17. Which JavaScript method is used to convert a string to uppercase?

a) toUpperCase()

b) upperCase()

c) toUpper()

d) upper()

Answer: a) toUpperCase()

18. Which HTML tag is used to define a table row?

a) <row>

b) <tr>

c) <td>

d) <table>

Answer: b) <tr>
19. Which CSS property is used to set the background color of an element?

a) background-color

b) color

c) background

d) bg-color

Answer: a) background-color

20. Which JavaScript method is used to remove an HTML element from the document?

a) removeElement()

b) deleteElement()

c) remove()

d) delete()

Answer: c) remove()

21. Which HTML tag is used to define a line break?

a) <br>

b) <break>

c) <lb>

d) <newline>

Answer: a) <br>

22. Which CSS property is used to set the font style of text?

a) font

b) font-style
c) text-style

d) style

Answer: b) font-style

23. Which JavaScript method is used to round a number to the nearest integer?

a) round()

b) ceil()

c) floor()

d) toInt()

Answer: a) round()

24. Which HTML tag is used to create a numbered list?

a) <ol>

b) <li>

c) <ul>

d) <list>

Answer: a) <ol>

25. Which CSS property is used to set the width of an element?

a) size

b) width

c) element-width

d) setWidth()

Answer: b) width
26. Which JavaScript method is used to convert a string to a number?

a) parseNumber()

b) toNumber()

c) parseInt()

d) number()

Answer: c) parseInt()

27. Which HTML tag is used to define a level two heading?

a) <h2>

b) <heading2>

c) <h>

d) <level2>

Answer: a) <h2>

28. Which CSS property is used to set the height of an element?

a) size

b) height

c) element-height

d) setHeight()

Answer: b) height

29. Which JavaScript method is used to get the current date and time?

a) getCurrentTime()

b) getDate()

c) now()
d) getTime()

Answer: c) now()

30. Which HTML tag is used to define a form input field?

a) <input>

b) <form>

c) <field>

d) <textfield>

Answer: a) <input>
1. Which of the following is a server-side scripting language commonly used for web
development?

a) PHP

b) JavaScript

c) HTML

d) CSS

Answer: a) PHP

2. Which database management system is commonly used with PHP for storing and retrieving
data?

a) MySQL

b) MongoDB

c) PostgreSQL

d) Oracle

Answer: a) MySQL

3. Which PHP function is used to establish a connection to a MySQL database?


a) mysqli_connect()

b) mysql_connect()

c) pdo_connect()

d) db_connect()

Answer: a) mysqli_connect()

4. Which SQL statement is used to insert data into a MySQL database?

a) INSERT INTO

b) UPDATE

c) SELECT

d) DELETE FROM

Answer: a) INSERT INTO

5. Which PHP function is used to execute an SQL query and fetch the results from a MySQL
database?

a) mysqli_query()

b) mysql_query()

c) pdo_query()

d) db_query()

Answer: a) mysqli_query()

6. Which PHP function is used to retrieve a single row of data from a MySQL result set?

a) mysqli_fetch_row()

b) mysql_fetch_row()

c) pdo_fetch_row()
d) db_fetch_row()

Answer: a) mysqli_fetch_row()

7. Which PHP function is used to retrieve multiple rows of data from a MySQL result set?

a) mysqli_fetch_array()

b) mysql_fetch_array()

c) pdo_fetch_array()

d) db_fetch_array()

Answer: a) mysqli_fetch_array()

8. Which PHP function is used to sanitize user input and prevent SQL injection in a MySQL
query?

a) mysqli_real_escape_string()

b) mysql_escape_string()

c) pdo_escape_string()

d) db_escape_string()

Answer: a) mysqli_real_escape_string()

9. Which PHP function is used to handle errors and exceptions in MySQL database operations?

a) mysqli_error()

b) mysql_error()

c) pdo_error()

d) db_error()

Answer: a) mysqli_error()
10. Which PHP superglobal variable is used to retrieve data sent through a POST request?

a) $_POST

b) $_GET

c) $_REQUEST

d) $_SERVER

Answer: a) $_POST

11. Which PHP function is used to redirect the user to a different page?

a) header()

b) redirect()

c) location()

d) navigate()

Answer: a) header()

12. Which MySQL data type is used to store text with a fixed length?

a) CHAR

b) VARCHAR

c) TEXT

d) BLOB

Answer: a) CHAR

13. Which PHP function is used to encrypt passwords for secure storage in a MySQL database?

a) password_hash()

b) md5()

c) sha1()
d) hash()

Answer: a) password_hash()

14. Which SQL statement is used to update data in a MySQL database?

a) UPDATE

b) INSERT INTO

c) DELETE FROM

d) SELECT

Answer: a) UPDATE

15. Which PHP function is used to retrieve the number of rows affected by a MySQL query?

a) mysqli_affected_rows()

b) mysql_affected_rows()

c) pdo_affected_rows()

d) db_affected_rows()

Answer: a) mysqli_affected_rows()

16. Which MySQL data type is used to store a date and time value?

a) DATE

b) TIME

c) DATETIME

d) TIMESTAMP

Answer: c) DATETIME
17. Which PHP function is used to format a date and time value in a specific format?

a) date()

b) time()

c) format()

d) strftime()

Answer: a) date()

18. Which SQL statement is used to delete data from a MySQL database?

a) DELETE FROM

b) UPDATE

c) INSERT INTO

d) SELECT

Answer: a) DELETE FROM

19. Which PHP function is used to start a session and store session data?

a) session_start()

b) start_session()

c) initiate_session()

d) begin_session()

Answer: a) session_start()

20. Which MySQL data type is used to store a large amount of binary data?

a) BINARY

b) VARBINARY
c) BLOB

d) TEXT

Answer: c) BLOB

21. Which PHP function is used to check if a session variable is set?

a) isset()

b) empty()

c) session_isset()

d) session_is_set()

Answer: a) isset()

22. Which SQL statement is used to retrieve data from a MySQL database based on specified
conditions?

a) SELECT

b) UPDATE

c) INSERT INTO

d) DELETE FROM

Answer: a) SELECT

23. Which PHP function is used to close a connection to a MySQL database?

a) mysqli_close()

b) mysql_close()

c) pdo_close()

d) db_close()

Answer: a) mysqli_close()
24. Which MySQL data type is used to store a numeric value with decimal precision?

a) INT

b) FLOAT

c) DECIMAL

d) DOUBLE

Answer: c) DECIMAL

25. Which PHP function is used to retrieve the ID of the last inserted record in a MySQL
database?

a) mysqli_insert_id()

b) mysql_insert_id()

c) pdo_last_insert_id()

d) db_last_insert_id()

Answer: a) mysqli_insert_id()

26. Which SQL statement is used to create a new table in a MySQL database?

a) CREATE TABLE

b) ALTER TABLE

c) DROP TABLE

d) INSERT INTO

Answer: a) CREATE TABLE

27. Which PHP function is used to check if a file exists on the server?

a) file_exists()
b) exists()

c) file_check()

d) is_file()

Answer: a) file_exists()

28. Which SQL statement is used to add a new column to an existing table in a MySQL
database?

a) ALTER TABLE

b) CREATE TABLE

c) UPDATE TABLE

d) ADD COLUMN

Answer: a) ALTER TABLE

29. Which PHP function is used to delete a file from the server?

a) unlink()

b) delete_file()

c) remove_file()

d) file_delete()

Answer: a) unlink()

30. Which SQL statement is used to join two or more tables together in a MySQL database
query?

a) JOIN

b) UNION

c) SELECT

d) GROUP BY
Answer: a) JOIN

You might also like