MCQ Exam

30:00

Question 1: What is the purpose of the CSS position property?

Question 2: Which HTML tag is used to define an unordered list?

Question 3: How do you select an element with id "demo" in CSS?

Question 4: How do you select the nth-of-type element in CSS?

Question 5: Which CSS property is used to change the font size of an element?

Question 6: How do you create a function in PHP?

Question 7: What is the CSS property used to set the outline of an element?

Question 8: Which HTML tag is used to define a hyperlink?

Question 9: What is the purpose of the require statement in PHP?

Question 10: What is the purpose of CSS?

Question 11: How do you select the nth child element in CSS?

Question 12: How do you concatenate two strings in PHP?

Question 13: Write a PHP program to check if a number is prime

Question 14: How do you select all paragraphs in CSS?

Question 15: What is the result of the following expression: "5" + 2 in JavaScript?

Question 16: Which CSS property is used to control the width of an element?

Question 17: What is the correct HTML for creating a horizontal line?

Question 18: What is the purpose of the array_shift() function in PHP?

Question 19: How do you center an element horizontally in CSS?

Question 20: What is the correct CSS syntax for making all the

elements bold?

Question 21: What is a parameter in a PHP function?

Question 22: What is the purpose of the HTML

element?

Question 23: What is the difference between single quotes (') and double quotes ("") in PHP string literals?

Question 24: What is the result of the following expression: 5 % 2 in JavaScript?

Question 25: Which HTML attribute is used to specify that an input field must be filled out?

Question 26: What is the difference between include and require in PHP?

Question 27: Which CSS property is used to underline text?

Question 28: How do you declare a variable in PHP?

Question 29: What is PHP?

Question 30: How do you make a list that lists its items with numbers in HTML?

Question 31: What is the foreach loop used for in PHP?

Question 32: Write a PHP program to find the length of a given string

Question 33: How do you open and close a file in PHP?

Question 34: What is the scope of a global variable in PHP?

Question 35: Which CSS property is used to create a shadow effect on text?

Question 36: How do you select elements that are not hovered over in CSS?

Question 37: How do you select elements that are visited links in CSS?

Question 38: What is the correct HTML element for the largest heading?

Question 39: What is the use of the array_unshift() function in PHP?

Question 40: What is the correct HTML for creating a submit button?

Question 41: What is the difference between fopen and file_get_contents for reading files in PHP?

Question 42: How do you select all headers (h1 to h6) in CSS?

Question 43: How do you check if a file exists in PHP?

Question 44: Which CSS property is used to make text bold?

Question 45: Which HTML tag is used to define a paragraph?

Question 46: How do you comment out multiple lines of code in JavaScript?

Question 47: Which HTML tag is used to define a list item?

Question 48: What is the CSS property used to change the text color of an element?

Question 49: What is the CSS property used to set the border width of an element?

Question 50: What is the correct HTML for creating a table header?

Question 51: How do you add an element to the end of an array in JavaScript?

Question 52: What is the purpose of the array_keys() function in PHP?

Question 53: How do you define a constant in PHP?

Question 54: How do you write a conditional statement for executing some code if "x" is equal to 5 in JavaScript?

Question 55: What is the purpose of the array_intersect() function in PHP?

Question 56: Write a PHP program to find the largest element in an array

Question 57: How do you call a function named "myFunction" in JavaScript?

Question 58: How do you create an ordered list with numbers in HTML?

Question 59: What is the purpose of the array_pop() function in PHP?

Question 60: How do you select elements that have focus in CSS?

Question 61: What is the correct HTML for creating a text area?

Question 62: How do you declare a function in JavaScript?

Question 63: What is the correct JavaScript syntax for referring to an external script called "script.js"?

Question 64: Write a PHP program to find the number of vowels in a given string

Question 65: What is the CSS property used to add shadow to text?

Question 66: What is the correct HTML for inserting a paragraph?

Question 67: Which CSS property is used to control the space between lines of text?

Question 68: How do you select elements that are out of focus in CSS?

Question 69: What is the CSS property used to set the padding on all sides of an element?

Question 70: What is the CSS property used to control the spacing between lines of text?

Question 71: What is the correct HTML for creating a hyperlink?

Question 72: What is the correct HTML for creating a hyperlink to a webpage?

Question 73: What is the purpose of the HTML element?

Question 74: What is the difference between require_once and require in PHP?

Question 75: What is the correct HTML for creating a checkbox?

Question 76: Which HTML tag is used to define an external style sheet?

Question 77: What is the correct HTML for creating a subscript text?

Question 78: Explain the concept of variable variable names in PHP.

Question 79: What is the correct HTML for creating a button?

Question 80: What is the use of the array_push() function in PHP?

Question 81: What is the purpose of the include statement in PHP?

Question 82: Which symbol is used to comment out a single line in PHP?

Question 83: Which HTML tag is used to define an internal style sheet?

Question 84: How do you create a comment in HTML?

Question 85: Write a PHP program to find the sum of all odd numbers from 1 to 100

Question 86: How do you make a background image repeat horizontally in CSS?

Question 87: How do you create a new paragraph in HTML?

Question 88: What is the CSS property used to set the text transform of an element?

Question 89: How do you include an external CSS file in an HTML document?

Question 90: How do you select elements that have a specific attribute with a specific value in CSS?

Question 91: Write a PHP program to add two numbers, 5 and 3, and display the result

Question 92: Write a PHP program to count the number of words in a given sentence

Question 93: What is the correct HTML for creating a superscript text?

Question 94: What is the CSS property used to control the width of an element?

Question 95: Write a PHP program to sort an array in ascending order

Question 96: How do you select elements that are checked (e.g., checkboxes) in CSS?

Question 97: What is the JavaScript syntax for creating an object?

Question 98: Write a PHP program to find the LCM of two numbers

Question 99: What is the correct way to write a JavaScript array?

Question 100: How do you make a text input field required in HTML?

Question 101: Write a PHP program to check if a number is even or odd

Question 102: Write a PHP program to check if a year is a leap year

Question 103: How do you change the text of an HTML element with id="demo" using JavaScript?

Question 104: Write a PHP program to find the GCD of two numbers

Question 105: What is the CSS property used to set the font family of an element?

Question 106: What is the CSS property used to set the text decoration of an element?

Question 107: How do you call a function in PHP?

Question 108: How do you write data to a file in PHP?

Question 109: What is the JavaScript operator for exponentiation?

Question 110: Which HTML tag is used to define a table row?

Question 111: How do you select all elements with a specific attribute in CSS?

Question 112: Write a PHP program to find the second largest element in an array

Question 113: What is the latest stable version of PHP?

Question 114: Which CSS property is used to change the background color of an element?

Question 115: How do you select the first child element in CSS?

Question 116: What is the purpose of the CSS z-index property?

Question 117: Write a PHP program to find the smallest element in an array

Question 118: How do you create a new list item in HTML?

Question 119: What does CSS stand for?

Question 120: Write a PHP program to check if a string is a palindrome

Question 121: How do you round a number to the nearest integer in JavaScript?

Question 122: Write a PHP program to declare a variable named "num" and assign it the value 42

Question 123: Write a PHP program to generate a random number between 1 and 100

Question 124: Write a PHP program to reverse an array

Question 125: What is the use of the array_values() function in PHP?

Question 126: What is the CSS property used to set the margin on the top of an element?

Question 127: What is the purpose of the HTML element?

Question 128: Write a PHP program to find the average of an array of numbers

Question 129: Write a PHP program to find the Fibonacci series up to a given number

Question 130: What is the CSS property used to control the spacing between elements?

Question 131: Write a PHP program to print the first 10 natural numbers

Question 132: How do you add an element to an associative array in PHP?

Question 133: What is the use of the array_combine() function in PHP?

Question 134: What is the correct HTML for creating a hyperlink to another website?

Question 135: What is the difference between include_once and include in PHP?

Question 136: What is the correct HTML for inserting a line break?

Question 137: Which CSS property is used to control the space between the letters of text?

Question 138: How do you group multiple selectors in CSS?

Question 139: What is the CSS property used to set the list item marker style?

Question 140: Which HTML element is used to display a scalar measurement within a range?

Question 141: How do you create a hyperlink that will send an email?

Question 142: What is the CSS property used to set the background color of an element?

Question 143: How do you select the last child element in CSS?

Question 144: Which PHP data type is used to store whole numbers?

Question 145: What is the correct HTML for creating a numbered list?

Question 146: Write a PHP program to find the square root of a given number

Question 147: What is the CSS property used to set the text alignment within an element?

Question 148: How do you select all elements with a specific class in CSS?

Question 149: Write a PHP program to reverse a given string

Question 150: How do you select the first letter of a paragraph in CSS?

Question 151: What is the CSS property used to set the border color of an element?

Question 152: How do you make a text italic in CSS?

Question 153: What is the result of the following expression: 5 + "5" in JavaScript?

Question 154: What is the CSS property used to control the style of the bullet in a list?

Question 155: What is the ternary operator in PHP, and how is it used?

Question 156: What is the correct HTML for inserting an image?

Question 157: Write a PHP program to find the sum of all even numbers from 1 to 100

Question 158: What is the CSS property used to control the style of a border?

Question 159: How do you add comments in CSS?

Question 160: What is the purpose of the CSS display property?

Question 161: What is the CSS property used to set the font style of an element?

Question 162: How do you make a list that lists its items with squares?

Question 163: How do you select elements with class "example" in CSS?

Question 164: How do you select the first line of a paragraph in CSS?

Question 165: What is the purpose of the array_merge() function in PHP?

Question 166: Write a PHP program to find the largest number among three numbers

Question 167: What is the CSS property used to set the maximum width of an element?

Question 168: How do you select an element by its ID in CSS?

Question 169: What is the use of the array_diff() function in PHP?

Question 170: What is the CSS property used to set the opacity of an element?

Question 171: What is the correct HTML for creating a line break?

Question 172: Write a PHP program to display "Hello, World!"

Question 173: Write a PHP program to find the sum of all prime numbers between 1 and 100

Question 174: How do you create a for loop in JavaScript?

Question 175: What is the correct HTML for creating a text input field?

Question 176: What is the purpose of the array_push() function in PHP?

Question 177: How do you create a JavaScript function that takes parameters?

Question 178: What is the CSS property used to set the border radius of an element?

Question 179: How do you select elements that are in a specific state, like when hovered over, in CSS?

Question 180: Write a PHP program to find the sum of digits of a given number

Question 181: What is the correct HTML for inserting a background image?

Question 182: Write a PHP program to remove duplicates from an array

Question 183: Which HTML tag is used to define a table?

Question 184: How do you select elements that are being clicked in CSS?

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

Question 186: Which event is triggered when a user clicks on an HTML element?

Question 187: What is the correct HTML for referring to an external style sheet?

Question 188: Which CSS property is used to change the text color of an element?

Question 189: What is the correct HTML for creating a radio button?

Question 190: What is the JavaScript syntax for writing comments?

Question 191: What is the correct HTML for creating a table?

Question 192: What is the purpose of the array_key_exists() function in PHP?

Question 193: What is the correct HTML for creating a drop-down list?

Question 194: What is the CSS property used to set the height of an element?

Question 195: Which CSS property is used to control the alignment of text?

Question 196: What is the correct way to declare a JavaScript variable?

Question 197: What is the correct HTML for creating a hyperlink to another website in a new tab?

Question 198: How do you create a JavaScript function that returns a value?

Question 199: What is the purpose of the HTML element?

Question 200: How do you select elements that are disabled in CSS?

Question 201: How do you create a hyperlink to another webpage?

Question 202: How do you add a comment in JavaScript?

Question 203: Write a PHP program to find the factorial of a given number using recursion

Question 204: Which HTML element defines navigation links?

Question 205: How do you make a text input field read-only in HTML?

Question 206: How do you create an unordered list with square bullets?

Question 207: Which property is used to change the left margin of an element?

Question 208: What is the CSS property used to set the font weight of an element?

Question 209: How do you select all links in CSS?

Question 210: Which CSS property is used to control the transparency of an element?

Question 211: How do you check if a variable is set in PHP?

Question 212: What does HTML stand for?

Question 213: How do you select the last line of a paragraph in CSS?

Question 214: What is the correct HTML for creating a hyperlink to an email address?

Question 215: What is the correct HTML for creating an email link?

Question 216: What is the use of the array_flip() function in PHP?

Question 217: How do you create an ordered list in HTML?

Question 218: What is the correct HTML for inserting a copyright symbol?

Question 219: What is an associative array in PHP?

Question 220: What is the scope of a local variable in PHP?

Question 221: What is the purpose of the CSS float property?

Question 222: What is the correct HTML for creating a video?

Question 223: How do you create a hyperlink in HTML?

Question 224: Which CSS property is used to add rounded corners to an element?

Question 225: How do you create a class selector in CSS?

Question 226: What is the purpose of the PHP function "echo"?

Question 227: What is a return statement in PHP, and why is it used?

Question 228: Write a PHP program to find the power of a number

Question 229: What is the correct way to write an if statement in JavaScript?

Question 230: Write a PHP program to check if a string is a valid email address

Question 231: How do you access an element in an associative array in PHP?

Question 232: Write a PHP program to find the factorial of a number

Question 233: What is the correct way to end a PHP statement?

Question 234: What does the "box model" in CSS refer to?

Question 235: Which operator is used for strict equality in JavaScript?

Question 236: What is the correct HTML for creating a copyright symbol?

Question 237: What is the difference between == and === in PHP?

Question 238: Which HTML tag is used to create a hyperlink?

Question 239: What is the correct CSS syntax for changing the font of an element to Arial?

Question 240: What is the purpose of the unset function in PHP?

Question 241: What does JavaScript stand for?

Question 242: What is the correct HTML for adding a background color?