TCS Xplore 2023 - UI ( html , css ,JavaScript ) MCQ quistion for best practice ( iON Proctored Assessment )
1. Which of the below is the correct way to set a font size?
a. h2 {font-size:200pixels;} b. h2 {font-size:200;}
b. h2 {font-size:200px;} d. h2 {font-size:200%;}
2 To specify table border in CSS _____ proper is used
a. table-border b. border
b. Tb-border D. tbl-border
3. Block element can be aligned by setting the left and right margin to “align”
a. TRUE b. FALSE
4. Output of the below script-
<html>
<body>
<p id=”showresult”> <b> Welcome To TCS </b> </p>
<input type=”button” onclick=”display()” value=” Click Me”/>
<script>
function display()
{
b = document.getElementById(‘showresult’).innerHTML;
alert(b)
}
</script>
</body>
</html>
a. Internal Error b. None of the option
b. <b> Welcome TO TCS </b> d. Welcome To TCS
5. Output of below script.
<html>
<body>
<input type=”text” name=”Java” value=”JDK” />
<input type=”text” name=”Version” value=”1.8” />
<button onclick=”display()”> Display </button>
<div id = “content”></div>
<script>
function display() {
a = document.getElementByTagName(“input”);
document.getElementById(‘content’).innerText = a[0].value+a[1].value;
}
</script>
</body>
</html>
a. None of the Option b. JDK1.8
b. JavaVersion d. Internal Error
6. Which of the following attribute is used to define equal style for element for the same class name ?
a. class c. id
b. element d. universal
7. Which one of the following is invalid in html5 ?
a. datetime b. day
b. month d. date
8. Which of following is the correct syntax for applying table border ?
a. table , th , td{border=1px solid black;}
b. table , th , td{border-1px solid black;}
c. table , th , td{1px solid black;}
d. table , th , td{border:1px solid black;}
9. Which of the following is valid margin property value ?
a. solid c. auto
b. dashed d. dotted
10. Which among of following is not css background property ?
a. background-attachment c. background-repeat
b. background-position d. background-render
Some key points :
1. All html tags have closing tag ?
Ans : False
2. p{color:green;} <p> Education inTalk</p> -- paragraph printed in which color ?
Ans : green
3. Emphasized text in html :
Ans : <em>
4. text-align : justify ; -- text will align in which direction ?
Ans Center
--------------------------------------------------------------------------------------------------------------
Multiple Choice Questions on UI - Part 2
11. Find the value of x - var x=100 + 5**3 ?
a. 125 c. 225
b. 115 d. NAN
12. Which of the following is inline element ?
a. <hr> c. <br>
b. <img> d. <a>
13. Output of code snippet ?
<script type="text/javascript" language="javascript"> var a = "Scaler"; var result = a.substring(2, 4); document.write(result); </script>
Ans : al
14. Output of code snippet ?
<script type="text/javascript" language="javascript">
var x=12; var y=8; var res=eval("x+y"); document.write(res); </script>- <script>
- var arr=[4,3,,1];
- for(i=0;i<4;i++){
- document.writeln(arr[i]);
- }
- </script>
- <p id="demo"></p>
- <script>
- functionourFunction()
- {
- document.getElementById("demo").innerHTML=Math.abs(-7.25);
- }
- </script>
Comments
Post a Comment