HTML Question Bank
HTML Question Bank
3) What is an Arithmetic operator in java script? What are the different types of
Arithmetic operators used in java script?
a) In JavaScript, arithmetic operators are used to perform mathematical operations on
numeric values.
b) These operators allow you to perform addition, subtraction, multiplication, division,
and more. Here are some common arithmetic operators in JavaScript:
i) Addition (+): The addition operator is used to add two or more numeric values
together.
var sum = 5 + 3; // sum is now 8
ii) Subtraction (-): The subtraction operator is used to subtract one numeric value
from another.
var difference = 10 - 4; // difference is now 6
iii) Multiplication (*): The multiplication operator is used to multiply two numeric
values.
var product = 6 * 7; // product is now 42
iv) Division (/): The division operator is used to divide one numeric value by another.
var quotient = 20 / 4; // quotient is now 5
v) Modulus (%): The modulus operator returns the remainder of the division of one
number by another.
var remainder = 17 % 5; // remainder is 2
vi) Increment (++) and Decrement (--): These operators are used to increase or
decrease the value of a variable by 1.
var x = 5;
x++; // Increment x by 1 (x is now 6)
var y = 10;
y--; // Decrement y by 1 (y is now 9)
5) What is the full form of php ? What are the Arithmetic operators in php?
a) The full form of PHP is "Hypertext Preprocessor."
b) It is a popular server-side scripting language used for web development to create
dynamic web pages.
c) PHP includes several arithmetic operators for performing mathematical operations in
your code. Some of the basic arithmetic operators in PHP are:
i) Addition: + (e.g., $a + $b)
ii) Subtraction: - (e.g., $a - $b)
iii) Multiplication: * (e.g., $a * $b)
iv) Division: / (e.g., $a / $b)
v) Modulus (remainder): % (e.g., $a % $b)
vi) Exponentiation: ** (e.g., $a ** $b)
6) Describe html tags. What is the role of the <head> tag in HTML?
a) HTML (Hypertext Markup Language) tags are used to structure and define the
elements and content of a web page.
b) HTML tags are enclosed in angle brackets ("<" and ">") and come in pairs, with an
opening tag and a closing tag.
c) The opening tag contains the tag name, and the closing tag is the same as the opening
tag but with a forward slash ("/") before the tag name. Here's a basic structure of an
HTML tag:
d) Some common HTML tags include:
i) <html>: Defines the beginning and end of an HTML document.
ii) <head>: Contains meta-information about the HTML document and typically
includes elements like <title>, <meta>, and <link>.
iii) <title>: Sets the title of the web page that appears in the browser's title bar or tab.
iv) <p>: Defines a paragraph.
v) <a>: Creates hyperlinks to other web pages or resources.
vi) <img>: Embeds images in the document.
e) The <head> element is a container for metadata (data about data) and is placed
between the <html> tag and the <body> tag.
f) It does not display any visible content on the web page but provides important details
for the browser and search engines.
<head>
<title>HTML Tag</title>
</head>
<body>
<img src = "https://www.tutorialspoint.com/images/html.gif"
alt = "HTML Tutorial" height = "150" width = "140" />
</body>
</html>
c) The <img> element is used to display images.
d) The src attribute specifies the source URL of the image file.
e) The alt attribute provides alternative text for the image
f) The width and height attributes allow you to define the dimensions of the image in
pixels, which can be useful for controlling the image's size.
29) Explain AJAX in detail. How will it be helpful for web development ?
a) AJAX (Asynchronous JavaScript and XML) is a set of web development techniques
that enables web applications to communicate with a web server asynchronously,
without requiring a full page refresh. It helps web development by:
b) Improving User Experience: AJAX allows for smoother and more responsive web
applications, reducing the need for full page reloads.
c) Reducing Server Load: AJAX requests are typically smaller, reducing server load
and improving website performance.
d) Bandwidth Efficiency: AJAX saves bandwidth and reduces data transfer costs,
important for mobile users.
e) Real-time Updates: AJAX is used for real-time features like chat, notifications, and
live updates.
f) Cross-browser Compatibility: AJAX is supported by most modern browsers,
ensuring broad compatibility.
g) Interactive Forms: AJAX can validate and submit form data without refreshing the
entire page, offering a smoother user experience.