HTML CSS test basic
HTML CSS test basic
1. Which of the following tag is used for inserting the largest heading in
HTML?
1. <h3>
2. <h1>
3. <h5>
4. <h6>
1. <i>
2. <ul>
3. <u>
4. <pre>
3. Which of the following is the container for <tr>, <th>, and <td> ?
1. <data>
2. <table>
3. <group>
1. <Doctype HTML>
2. <\Doctype html>
3. <Doctype>
4. <!DOCTYPE html>
5. Which of the following is the correct syntax for referring the external
style sheet?
1. example
2. #example
3. .example
4. Class example
1. p
2. div + p
3. div p
4. div ~ p
1. Inline CSS
2. Internal CSS
3. External CSS
11. How can you apply a style to an element with the id “header” in
CSS?
— A. #header
— B. .header
— C. element:header
— D. header:
13. Which CSS pseudo-class is used to select and style an element when
the mouse is over it?
— A. :hover
— B. :active
— C. :focus
— D. :visited
15. How can you apply a style to every second row of a table in CSS?
— A. tr:nth-child(even)
— B. tr:nth-child(odd)
— C. tr:nth-row(2)
— D. tr:nth-row(odd)
18. Which of the following is used to increase the row height in CSS
grids?
A. cell spacing
B. Cell padding
C. Row span
D. Col span
JAVA MCQs
A) transient
B) volatile
C) strictfp
D) const
java
String s1 = "Hello";
String s2 = "Hello";
System.out.println(s1 == s2);
A) true
B) false
C) Compilation error
D) Runtime error
A) List
B) Set
C) Map
D) Iterator
A) true
B) false
C) null
D) 0
A) run()
B) start()
C) execute()
D) init()
A) ArithmeticException
B) NullPointerException
C) ClassCastException
D) ArrayIndexOutOfBoundsException
java
System.out.println(arr[4]);
A) 4
B) ArrayIndexOutOfBoundsException
C) null
D) Compilation error
A) It is synchronized.
D) Both A and C
java
str.concat(" Programming");
System.out.println(str);
A) Java Programming
B) Java
C) Compilation error
D) Runtime error
A) ArrayList
B) HashSet
C) TreeSet
D) LinkedList
int x = 10;
System.out.println(x);
else
System.out.println("Not executed");
A) 11
B) Not executed
C) 12
D) Compilation error
A) final
B) static
C) abstract
D) synchronized
A) java.util
B) java.collection
C) java.array
D) java.list
A) length()
B) size()
C) length[]
D ) getLength()
18. What will happen if you try to access an index that is
out of bounds in an array?