Font size
WorksheetsHTML CSS JavaScript
Total questions: 56
Worksheet time: 31mins
The output of the below code is:
<p id="demo"></p>
<script>
var text = "";
var i;
for (i = 0; i < 5; i++) {
text += "The number is " + i + "<br>";
}
document.getElementById("demo").innerHTML = text;
</script>
The number is 0
The number is 1
The number is 2
The number is 3
The number is 4
The number is 5
The number is 0
The number is 1
The number is 2
The number is 3
The number is 4
The number is 1
The number is 2
The number is 3
The number is 4
The number is 5
Why is that person using "var"???
What is the difference between == and ===?
The === operator compares two values, without taking into account their types. == compares the values, but also makes their types into account.
Do I really need to reply this?
The == operator compares two values, without taking into account their types. === compares the values, but also makes their types into account.
The == operator is used to assign a value to a variable. === is used to compare the values of two variables.
What are HTML Tags?
HTML tags are composed of three things: an opening tag, content and ending tag. Some tags are unclosed tags.
HTML tags are composed of three things: an opening tag, content and ending tag. All tags need to be closed.
HTML tags define metadata about an HTML document. Metadata is data (information) about data.
I didn't know that I was supposed to be studying
What is the output of 10+20+"30" in JavaScript?
102030 because since there is a string, all the + will be treated as string concatenation operator (not binary +).
102030 because before you perform arithmetic operations you would have to explicitly convert those values to an actual number.
That will throw an unhandled exception, a try catch block is required to prevent it.
3030 because 10+20 will be 30. If there is numeric value before and after +, it treats as binary + (arithmetic operator).
Which of these is a loop?
if(x<10)
while(x<10)
var x=10;
text(x,10;10)
Greater than or equal to
> or =
> || =
>=
<=
When we are done with a line what do we put at the end?
a colon :
a semi-colon ;
a period .
a quotation mark "
What is a style sheet?
A style sheet is used to build a consistent, transportable, and well-designed style template.
To create a multicolor text on a web page
It is used to define a container for navigation links
It is used to define content aside from the content
What does a opening tag look like?
< >
</ >
<< >>
<
What does a closing tag look like?
< >
<\ >
</ >
<< >>
What should a HTML web page end with?
</html>
<head>
</end>
</body>
Which tag would you use for an ordered list?
<ol>
<ul>
<li>
None of the above
Which tag would you use to insert a image?
<marquee>
< a href>
<br>
<img src>
Javascript is _________ language.
Programming
Scripting
Application
applet
JavaScript is ______ Side Scripting Language.
JSP
Servlet
Server
Browser
JavaScript is can be written -
directly into JS file and included into HTML
directly into HTML pages
directly on the Server Script
None of these
JavaScript is designed for following purpose -
To Style HTML Pages
To Perform Server Side Scripting Opertion
To add interactivity to HTML Pages.
To Execute Query Related to DB on Server
JavaScript is an ________ language.
compiled
interpreted
JavaScript Code is written inside file having extension __________.
.jsc
.jvs
.js
.javascript
Why JavaScript is called as Lightweight Programming Language ?
because JS can provide programming functionality inside but up to certain extend.
because JS is client side scripting
because JS is available free of cost.
because we can add programming functionality inside JS
Local Browser used for validations on the Web Pages uses __________.
HTML
CSS
js
java
JavaScript Code can be called by using _________.
RMI
Function / Method
Triggering Event
Preprocessor
Is this correct syntax to include JS Code inside HTML Page ?
<script type="text/javascript">
...
</script>
Yes
No
We cannot Place JS Code in the body tag . Say true/false.
True
False.
Is this correct syntax to include JS Code inside HTML Page ?
<script type="text/javascript">
...
</script>
Yes
No
<script type="text/javascript">
x=4+"4";
document.write(x);
</script>
Output------?
44
8
4
Error output
Which of the following platform(s) can be used to run Javascript Code
Google Chrome
Firefox
Microsoft Edge
Safari
You can change an image's size using Javascript?
True
False
1.Which of the following is the correct tag to create a text box?
<input> text </input>
<text>
<input = “text”>
<input type = “text”>
Which of the following is the correct way to add an attribute?
<src>
classes:ids
id="title"
<id>
What symbol should you use to target an id in css?
.
+
id
#
What symbol should you use to target a class name in css?
#
()
.
class
TRUE OR FALSE: HTML is used to style web pages.
True
False
TRUE OR FALSE: CSS is used to style web pages
True
False
How do you change the font color with CSS?
font-color: green;
color: green;
change-font-color: green;
fontcolor=green;
CSS stands for
Code Style Sheet
Coding Style Sheet
Cascading Sheet Style
Cascading Style Sheet
