On this page, you will find a collection of important questions and answers for Unit , specifically designed for Gauhati University FYUGP BCom 1st Semester Information Technology in Business. These questions and answers are carefully prepared to help you score well in your exams. Use this guide as a valuable reference for your exam preparation.
Gauhati University FYUGP BCom 1st Semester Information Technology in Business
UNIT-6
INTRODUCTION TO WEB RESOURCE CREATION
1. HTML stands for________
A. Hypo text made up language
B. Hypertext markup language
C. Heuristic language
D. Hypertext Manipulation language
ANSWER: B
2. WWW stands for
A. World Wide Weapon
B. World Wide Windows
C. World Wide Web
D. World Wide Writers
ANSWER: C
3. HTTP stands for
A. Hypertext Transfer Protocol
B. Hypertext Transmission Protocol
C. Hyper Text Transfer Program
D. Hyper text Traditional Protocol
ANSWER: A
4. is known as father of World Wide Web.
A. Robert Cailliau
B. Tim Thompson
C. Charles Darwin
D. Tim Berners-Lee
ANSWER: D
6. IP stands for______
A. Information Provider
B. Internet Provider
C. Internet Protocol
D. Information Protocol
ANSWER: C
6. An is a company that provides internet access to users or subscribers of its service.
A. ARPAnet
C. Internet Provider
B. Cyber net
D. Internet Service Provider
ANSWER: D
7. The process of transferring files from a web page on the internet to your computer is called_____
A. Uploading
B. Forwarding
C. Transferring
D. Downloading
ANSWER: D
8. Moving from one website to another is called______
A. transferring
B. shifting
C. browsing
D. loading
ANSWER: C
9. as Verification of a login name and password is known________
A. configuration
B. accessibility
C. authentication
D. logging in
ANSWER: C
10. is the oldest and most popular form of communication between computers.
A. Messanger
B. Chart
C. VoIP
D. E-Mail
ANSWER: D
Very short question
1. The internet supports a large system called the_______
ANSWER: World Wide Web
2. _________ are set of rules and procedures for communicating.
ANSWER: Protocols
3. Each computer connected to the internet must_______
ANSWER: have an unique IP address
4. A homepage is_____
ANSWER: the first page of a website.
5. Employee in an organization can use a part of the private intranet is called
ANSWER: extranet
6. ________ is a document commonly written in Hyper Text Markup Language (HTML) that is accessible through the Internet or other network using an internet browser
ANSWER: Web page
7. In order to upload a HTML file to a web server, you use
ANSWER: FTP
8. A web page is located using a
ANSWER: Uniform Resource Locator
9. Which of the following protocol is used for WWW?
ANSWER: HTTP
10. A webpage displays a picture. What tag was used to display that picture?
ANSWER: img.
Short Questions
1. What is HTML?
Ans: HTML stands for Hyper Text Markup Language. HTML is a markup language for web pages. With HTML, you can create websites and anything you can be viewed in a web browser.
2. What do you know about CSS?
Ans: CSS stands for Cascading Style Sheet. It is used to manage font size, style, and color combinations, which are applied on web pages. CSS used to look at a simple web page better. A single change in the CSS file can change the layout of the entire website.
3. What is Semantic HTML?
Ans: Semantic HTML represents the meaning of a web page rather than the only presentation. It is a coding style where the tags
4. Describe the difference between "visibility: hidden" and "display: none"?
Ans: "visibility: hidden" property is used to hide the element, that this element still takes up space, "display: none" eliminatenent element and does not takes up any space, even though the HTML for it is still in the code.
5. When will you use the CSS float property?
Ans: This is a usually used property. It describes how the element should be placed either left or right of the container.
6. Difference between implode and explode functions.
Ans: Implode function is used to join array to string, and explode function is used to split the string to an array.
7. List out the five values for "position."
Ans: Static, relative, absolute, fixed, and inherit are the five values for the position.
8. What are the different JavaScript types?
Ans: There are six types of JavaScript: String, null, undefined, boolean, object, and number. Objects include functions, array, and ordinary objects. Number includes integer and real numbers and special values such as NaN and infinity. Strings include empty strings.
9. What is an array, and What is the use of in_array() in PHP?
Ans: Arrays are used to store multiple values in a single variable. in_array() function checks whether the value is in the array or not.
10. How to integrate CSS file into a webpage?
Ans: You can integrate the CSS file into your HTML file using "link" property. You have add "link" property after <head> tag.
Example
=ØËÜ
<head>
<link href="filename.css" rel="stylesheet" type="text/css"> </head>
11. Describe different types of joins in MySQL.
Ans: There are four types of joins: Inner Join, Left join, Right join, Full outer join. Inner join returns records that have a value in both tables. Left join returns all the records from the left table and matching records from the right table. Right join returns all the records from the right table and matching records from the left table.
Full outer join returns all the records when there is a match in either the left or the right table.
12. Describe the difference between an alert box and a right table. confirmation/prompt box?
Ans: An alert box is a popup box that has an OK button. A confirmation box has two buttons OK button and Cancel button.
13. How to print a text on a web page using JavaScript?
Ans: You can use document.write() to print a text on a web page using Javascript.
14. List the new media elements in HTML5?
Ans: The new media elements are <audio>, <video>, <embed>,
<source>, <track>.
<audio> is for sound content.
<video> is for video or movie content.
<embed> is a container for an external application.
<source> is for multiple media resources for media elements.
<tracks> is for text track for media elements.
15. Explain the DOCTYPE term.
Ans: DOCTYPE term conveys that what type of HTML must be used. The browser uses the DOCTYPE term to determine how a web page must be rendered. DOCTYPE defines before. If you're not using DOCTYPE, then the browser loads the page in incorrect mode.
16. What is the use of count() in PHP?
Ans: Count() is used to count the number of elements in an array..
17. What is the difference between HTML elements and tags?
Ans: The difference between HTML elements and tags is elements that are used to communicate with the website on how to render the information. Elements are represented with, these form the HTML tags. HTML tags usually come in pairs and surrounding
18. Difference between session and cookie? text.
Ans: Session and cookie both stores the data and contain user information. Session stores information on the server-side and cookies store information on the client-side. Cookies stores limited information while the session has no limit in such a way.
19. What are the different types of websites?
Ans: There are two types of websites: Static and Dynamic. Statics websites are just layouts using HTML, CSS, JS portion, and it does not fetch any data from the database, whereas Dynamic on, and it fetch values and data from the database.
20. What is a prompt box?
Ans: Prompt method displays a dialog box that prompts the visitors for input. It is often used if you want the user to input some text before entering the page. Prompt box has two buttons, OK and Cancel, which the user has to choose to proceed after entering an input value.
21. How do you differentiate the linking of an image, email address, and website?
Ans: To link an image use <img> tag and "src" attribute. For hyperlinking, use anchor tag <a> and "href" attribute. The hyperlink has to be placed in between anchor tag and href stands for hypertext reference.
Example
=ØËÜ <imgsrc="image1.jpg"></img> <a href="abc@gmial.com">Email</a> <a href="www.abc.com">abc</a>
22. Explain the difference between the ordered list and unordered list.
Ans: In the ordered list, we use <ol> tag, which stands for an ordered list and shows the list with numbers. In the unordered list, we use <ul> tag, which stands for an unordered list and shows the list with bullets.
23. What is a pseudo-class?
Ans: Pseudo class is a style element. It works when the element goes on focus like when we mouse over a button, and it changes color and the color of visited and unvisited sites.
24. For what NaN function is used?
Ans: NaN function returns True if the value is Not a Number.
24. What do you mean by a responsive Number website or webpages ?
Ans: Responsive website or webpage detects the visitor's screen size and orientation and changes the layout according to it.
26. Mention what are the main language or platform used for web-design?
Ans: The main language used for web-designing a are
HTML: Base template
CSS: Styling
JavaScript: Functionality
PHP: Server side scripts
27. Explain how can you set an image as a background on web pages?
Ans: To set an image as a background on web page, point the body background to the name of your image you want to set as a background as shown below.
</head>tag.
<body background="picture.gif">
You can also fix the background image, so while using the scroll bar in the browser, it does not move. To do this add the
BGPROPERTIES tag as shown below
<body background = "picture.gif" bgproperties="fixed">
28. Mention what do you mean by Responsive design on a web page?
Ans: Responsive design is an approach to building sites to provide an optimal viewing and interaction experience. It focuses on easy navigation of site with a minimum of scrolling, panning and resizing framsall devices. Bootstrap is the most popular CSS, HTML and JS framework used for developing responsive web design
29. Mention what are some bad examples of web design?
Ans: Blinking, spinning or flashing images
Black background with white, light or pale text Black backgrounds with dark text
Busy tiled background images with any color text
Everything Centered Too many images or Huge images
List of links
Too many headlines or Blinking text
30) Explain what is Information Architecture?
Ans: On web page information, architecture is often referred to the structure and navigation of an entire site.
31) Explain how can you align picture so that one may be higher or lower than the other?
Ans: In order to align picture so that one may be higher or Tower than the other, use the align statement in your IMG SRC tag. <IMG SRC="http://www.xyz.com/chguy.gif' align=top> Also, you can use align=top or you can do align=middle/bottom.
32) Explain what is a Dreamweaver Template?
Ans: Dreamweaver Templates enables webmasters to define "non-editable" and "editable" regions of a webpage, only in Dreamweaver template the "non-editable" regions can be edited. Any changes implemented to the Dreamweaver Template will update any HTML pages that use the template.
34) Explain what is the difference between "visibility:hidden" and "display:none"?
Ans: They are both style properties
visibility:hidden: This property hides the element, but it still takes up space in the layout
display:none: It eliminates the element completely from the document. It does not take up any space, even though the HTML for it is still in the source code.
35) In CSS when you will use CSS float?
Ans: In CSS, you would use CSS float when you want to make an element of your page be pushed to the right or left and make other elements wrap around it.
36) Why should a graphic containing several words be saved in GIF instead of JPG?
Ans:- Ans: It is preferable to store the image should in GIF format of certain words because JPG has file compression features which may render the font unreadable.
37)Explain how can you integrate CSS file to your webpage?
Ans: To integrate CSS file with any number of HTML files, you have to integrate the file after the <head> tag using "Link" property. <head><Link REL=STYLESHEET HREF= "Type="text/css"></head> your webpage? "filename.css
38) List out some of the JQuery function used for webpage designing?
Ans: Some of the JQuery function used for webpage designing include
Simple slide panel
Simple disappearing effec
Chainable transition effect
Accordion#1 and Accordion#2
Animated hover effect
Entire block clickable
Collapsible panels
Image replacement gallery
Styling different link types
39) As a web-designer while declaring "delete" button what would be your color choice?
Ans: Make the "Delete" button more prominent by using color like Red, especially when you have to show two button side by side. Red is sign of caution, so that will definitely help the user to draw their attention.
40) Explain how can a developer learn about web design?
Ans: Developer can learn about web design by following tips Visit website like "Smashing Magazine" to get better idea about web design Another website is " Best Web Gallery" can also be helpful to get insight of quality design and layouts Try your hands on tools like Adobe Illustrator Create dynamic website using MySQL and PHP Learn basic languages as HTML, CSS, JavaScript, PHP or Query.
41. Explain why do people clear the screen multiple times when using a calculator?
Ans: The older version of calculators have several "cancel" button (C, CE). The CE button will only clear the last entry but does not interrupt with the current computation. For instance, if you enter 2+1 and then press CE, it would show 0, but the calculator expects a second operand for the addition. (2+ is still there in memory). So to ensure that nothing remains left in memory and to start a new calculation we often see people hitting clear button couple of times. It is not due to a flaw in the calculator's design.
42) Mention why is the mouse cursor slightly tilted and not straight?
Ans: During beginning of mouse technology, it was found that given the low resolution of the screens in those days, drawing a straight line and a line at a 45 degree angle was easier to do and more recognizable than the straight cursor. Also, the tilted arrow can help the click position easier to calculate because the origin of the cursors bitmap was in the upper left. This saved the mouse tracking subroutine a calculation on every click.
43) Explain what is Grid system?
Ans: A grid system is a structure comprising a series of horizontal and vertical lines which intersect and used to arrange content. It is a way of providing a system that designers can work with the structure and present content. For web design beginners, it is always suggested that they use the pre-made framework for web design as they are relatively easy to use.
44) While writing an error message what all things you need to take into consideration?
Ans: You need to take following things in consideration
Don't use negative words
Clearly mention the error so that the user knows what to correct
Give user a clue or link to solve the error
Put the blame on yourself and not on the user
45) Are the HTML tages and elements the same thing?
Ans: No, HTML tags and elements are not the same. Tags are the markup characters (like `<div>`, `</div>`) that define the start and end of an element, while elements are the entire structure, including the tags and the content between them. For example, `<p>Hello</p>` is an element, where `<p>` is the opening tag, and `</p>` is the closing tag.
46) What are tags and attributes in HTML?
Ans:- Tages are the primary component of the HTML that defines how the content will be structured/ formatted, whereas definutes are used along with the HTML tags to define the characteristics of the element. For example, <p align=" chatrer">Interview questions</p>, in this the 'align' is the attribute using which we will align the paragraph to show in the center of the view.
47) What are void elements in HTML?
Ans: HTML elements which do not have closing tags or do not need to be closed are Void elements. For Example<br />, <img> <hr />, etc.
48) What is the advantage of collapsing white space?
Ans: In HTML, a blank sequence of whitespace characters is treated as a single space character, Because the browser collapses multiple spaces into a single space character and this helps a developer to indent lines of text without worrying about multiple spaces and maintain readability and understandability of HTML codes.
49) What are HTML Entities?
Ans: In HTML some characters are reserved like '<', '>',", etc. To use these characters in our webpage we need to use the character entities called HTML Entities. Below are a few mapping between the reserved character and its respective entity character to be used.
Character
< <
> >
& &
(non-breaking space) Eg.10 PM
Eg.<p>10  PM</p>
Entity Name Entity Number
<
>
&
 
50) What is the 'class' attribute in HTML?
Ans: The class attribute is used to specify the class name for an HTML element. Multiple elements in HTML can have the same class value. Also, it is mainly used to associate the styles written in stylesheet with the HTML elements.
51) What is the difference between the 'id' attribute and the the 'class' attribute of HTML elements?
Ans: Multiple elements in HTML can have the same class value, whereas a value of id attribute of one element came class associated with another HTML element.
52) Define multipart form data?
Ans: Multipart form data is one of the values of the enctype stribute. It is used to send the file data to the server-side for processing. attribute are text/plain and application/x-www-form-urlencoded.
53) Describe HTML layout structure.
Ans: Every web page has different components to display the intended content and a specific UI. But still, there are few things which are templated and are globally accepted way to structure the web page, such as:
<header>: Stores the starting information about the web page.
<footer>: Represents the last section of the page.
<nav>: The navigation menu of the HTML page.
<article>: It is a set of information.
<section>: It is used inside the article block to define the basic structure of a page.
<aside>: Sidebar content of the page.
54) How to optimize website assets loading?
Ans: To optimize website load time we need to optimize its asset loading and for that:
CDN hosting - A CDN or content delivery network is geographically distributed servers to help reduce latency.
File compression - This is a method that helps to reduce the size of an asset to reduce the data transfer
File concatenation - This reduces the number of HTTP calls Minify scripts - This reduces the overall file size of js and CSS filesfiles.
55) What are the various formatting tags in HTML?
Ans: HTML has various formatting tags:
<b>- makes text bold
<i>- makes text italic
<em>- makes text italic but with added semantics importance <em>- increases the font size of the text by one unit
<big> decreases the font size of the text by one unit
<sub> - makes the text a subscript
<sup> - makes the text a superscript
<del> - displays as strike out text
<strong>- marks the text as important
<mark> - highlights the text
<ins> - displays as added text
56) What are the different kinds of Doctypes available?
Ans: The three kinds of Doctypes which are available:
Strict Doctype
Transitional Doctype
Frameset Doctype
57) Please explain how to indicate the character set being used by a document in HTML?
Ans: The character set is defined in <meta> tag inside <head> element.
<!DOCTYPE html>
<html>
<head>
<metacharset="UTF-8">
….
….
</head>
</html>
58) What is the difference between <strong>, <b> tags and <em>, <i> tags?
Ans: The effect on a normal webpage of the tags <strong>, <b> and<em>, <i> is the same. <b> and <i> tags stands for bold and italic. These two tags only apply font styling and bold tag <b>, just adds more ink to the text, these tags don't say anything about the text. Whereas, <strong> and <em> tags represent that the span of text is of strong importance or more importance and emphatic stress respectively than the rest of the text. These tags have semantic meaning.
59) What is the significance of <head> and <body> tag in HTML?
Ans :<head> tag provides the information about the document. It should always be enclosed in the <html> tag. This tag contains the metadata about the webpage and the tags which are enclosed by head tag like <link>, <meta>, <style>, <script>, etc. are not displayed on the web page. Also, there can be only 1 <head> tag in the entire Html document and will always be before the <body> tag.
<body> tag defines the body of the HTML document. It should always be enclosed in the <html> tag. All the contents which needs to be displayed on the web page like images, text, audio, video, contents, using elements like <p>, <img>, <audio>, <heading>, <video>, <div>, etc. will always be enclosed by the <body> tag. Also, there can be only 1 body element in an HTML document and will always be after the <head> tag.
60) Can we display a web page inside a web page or Is nesting of webpages possible?
Ans: Yes, we can display a web page inside another HTML web page. HTML provides a tag <iframe> using which we can achieve this functionality.
<iframesrc="urlofthewebpagetoembed" />
61) How is Cell Padding different from Cell Spacing?
Ans: Cell Spacing is the space or gap between two consecutive cells. Whereas, Cell Padding is the space or gap between the text/ content of the cell and the edge/ border of the cell. Please refer to the above figure example to find the difference.
62) How can we club two or more rows or columns into a single row or column in an HTML table?
Ans: HTML provides two table attributes "rowspan" and "colspan" to make a cell span to multiple rows and columns respectively.
63) Is it possible to change an inline element into a block level element?
Ans: Yes, it is possible using the "display" property with its value as "block", to change the inline element into a block-level element. 64) In how many ways can we position an HTML element?
Or
what are the permissible values of the position attribute?
Ans: There are mainly 7 values of position attribute that can be used to position an HTML element:
1. static: Default value. Here the element is positioned according to the normal flow of the document.
2. absolute: Here the element is positioned relative to its parent element. The final position is determined by the values of left, right, top, bottom.
3. fixed: This is similar to absolute except here the elements are positioned relative to the <html> element.
4. relative: Here the element is positioned according to the normal flow of the document and positioned relative to its original/ normal position.
5. initial: This resets the property to its default value.
6. inherit: Here the element inherits or takes the property of its parent.
65) In how many ways you can display HTML elements?
Ans : 1. inline: Using this we can display any block-level element as an inline element. The height and width attribute values of the element will not affect.
2. block: using this, we can display any inline element as a block-level element.
3. inline-block: This property is similar to inline, except by using the display as inline-block, we can actually format the element using height and width values.
4. flex: It displays the container and element as a flexible It follows flexbox property.
5. inline-flex: It displays the flex container as an inline structure. element while its content follows the flexbox properties.
6. grid: It displays the HTML elements as a grid container.
7. none: Using this property we can hide the HTML element.
Below are some of the display types which are rarely used:
1. table
2. inline-table
3. table-cell
4. table-colum
5. table-row
6. inline-grid
7. list-ite
8. inherit
9. initial
10. table-caption
66) What is the difference between "display: none" and "visibility: hidden", when used as attributes to the HTML element.
Ans: When we use the attribute "visibility: hidden" for an HTML element then that element will be hidden from the webpage but still takes up space. Whereas, if we use the "display: none" attribute for an HTML element then the element will be hidden, and also it won't take up any space on the webpage.
67) How to specify the link in HTML and explain the target attribute?
Ans: HTML provides a hyperlink - <a> tag to specify the links in a webpage. The 'href' attribute is used to specify the link and the 'target' attribute is used to specify, where do we want to open the linked document. The 'target' attribute can have the following values:
1. self: This is a default value. It opens the document in the same window or tab as it was clicked.
2._blank: It opens the document in a new window or tab.
3. _parent: It opens the document in a parent frame.
4._top: It opens the document in a full-body window.
68) In how many ways can we specify the CSS styles for the
Ans: There are three ways in which we can specify the styles HTML element?
for HTML elements: Inline: Here we use element. the 'style' attribute inside the HTML : Here we use the <style> tag inside the <
To apply the style we bind the elements using 'id' or 'class' attributes. Internal External: Here we use the <link> tag inside <head> tag to reference the CSS file into our HTML code. Again the binding between is done using 'id' or 'class' attributes. head> tag. elements and styles
69) How to include javascript code in HTML?
Ans: HTML provides a <script> tag using which we can run the javascript code and make our HTML page more dynamic.
<!DOCTYPE html> <html> <body> <h1> <span>This is a demo for </span> <u><spanid="demo"></span></u> </h1> </script>
<script> document.getElementById(“demo”).innerHTML="script Tag”
</body>
</html>
70) When to use scripts in the head and when to use scripts in the body?
Ans: If the scripts contain some event-triggered functions or jquery library then we should use them in the head section. If the script writes the content on the page or is not inside a function then it should be placed inside the body section at the bottom. In short, follow below three points:
Place library scripts or event scripts in the head section. Place normal scripts that do not write anything on the page, in
2. the head section until there is any performance in the Place scripts that render something on the web page at the
3. bottom of the body section.
71) What are forms and how to create forms in HTML?
Ans: The HTML form is used to collect the user inputs. HTML provides a <form> tag to create forms. To take input from the user the <input> tag inside the form can be sent to the check for processing. There are difference data types like 'button', 'checkbox', 'number', 'text', 'password's input etc.
<formaction="/submit_data.php">
<label>Enter your name: </label> <inputtype="text" name="name" />
<label>Enter Mobile number </label>
<inputtype="number"name="mobile_no"/>
<inputtype="submit" value="Submit'>
</form>
72) How to handle events in HTML?
Ans: HTML allows event trigger actions in browsers using javascript or JQuery. There are a lot of events like 'onclick', 'ondrag', 'onchange', etc.
<!DOCTYPE html>
<html>
<bodystyle="padding-top:50px">
<h3id="event_demo">0</h3>
<inputtype="button" onclick="myFunction()" value="Click Me"/ >
<inputtype="reset" onclick="reset()"value="Reset" />
</body>
<script>
functionmyFunction() { var value = document.get Element By Id ("event_demo").inner HTML
value = parseInt(value) + 1;
document.getElementById("event_demo").innerHTML =
value;
functionreset() { document.g } getElementById("event_demo").innerHTML=0;
li
</script>
</html>
HTML5 Interview Questions
73) What are some of the advantages of HTML5 over its previous versions?
Ans: Some advantages of HTML5 are:-
It has Multimedia Support.
It has the capabilities to store offline data using SQL databases and application cache.
Javascript can be run in the background.
HTML5 also allows users to draw various shapes like rectangles, circles, triangles, etc.
Included new Semantic tags and form control tags.
74) How can we include audio or video in a webpage?
Ans: HTML5 provides two tags: <audio> and <video> tags using which we can add the audio or video directly in the webpage.
75) Inline and block elements in HTML5?
Ans : Inline -
Inline elements just take up the space that is absolutely necessary for the content and does not start from a new line.Example:-<span>, <a>, <strong>, <img>, <button>, <em>, <select>, <abbr>, <label>, <sub>, <cite>, <abbr>, <script>, <label>, <i>, <input>, <output>, <q>, etc.
Block -
Blockelements start on a new line and consume the full width of the page available.Example:-<div>, <p>, <header>, <footer>, <h1>...<h6>, <form>, <table>, <canvas>, <video>, <blockquote>, <pre>, <ul> <ol>, <figcaption>, <figure> <hr>, <article>, <section>, etc.
76) What is the difference between <meter> tag and <progress> tag?
ogress<progress> tag should be used when we want to show the completion progress of a task, whereas if we just want a scalar the comment within a known range or fraction value. Also, we can specify multiple extra attributes for <meter> tags like 'form', 'low', 'high', 'min', etc.
77) Is drag and drop possible using HTML5 and how?
Ans: Yes, in HTML5 we can drag and drop an element. This can be achieved using the drag and drop-related events to be used with the element which we want to drag and drop.g
78) What type of audio files can be played using HTML5?
Ans: HTML5 supports the following three types of audio file
formats:
1. Mp
2. WAV
3. Ogg
79) What are the significant goals of the HTML5 specification?
Ans: These were the target area of the HTML5 specs:
Introduction of new element tags to better structure the web page such as <header> tag.
Forming a standard in cross-browser behavior and support for different devices and platforms
Backward compatible with the older version HTML web pages Introduction of basic interactive elements without the dependency of plugins such as <video> tag instead of the flash plugin.
80) Explain the concept of web storage in HTML5.
Ans: This web storage helps in storing some of the static data in the local storage of the browser so that we do not need to fetch it from the server every time we need it. There is a size limit based on different browsers. This helps in decreasing the load time and a smooth user experience. There are two types of web storage that are used to store data locally in HTML5:
Local Storage - This helps in storing data that will be retained even though the user reopens the browser. It is stored for each webapp on different browsers.
81) What is Microdata in HTML5?
Ans: It is used to help extract data for site crawlers and search engines. It is basically a group of name-value pairs. The groups are called items, and each name-value pair is a property. Most of the search engines like Google, Microsoft, Yandex, etc follow schema.org vocabulary to extract this microdata.
<divitemscopeitemtype="http://schema.org/ Software Application">
<spanitemprop="name">Interviewbit Games</span> -
REQUIRES
<spanitemprop="operatingSystem">ANDROID</span><br>
<linkitemprop="applicationCategory"href="http://schema.org/ GameApplication"/>
<divitemprop="aggregateRating"itemscopeitemtype="http:// schema.org/AggregateRating">
RATING:
<spanitemprop="ratingValue">4.6</span>(
<spanitemprop="ratingCount">8864</span>ratings)
</div>
<divitemprop="offers"itemscopeitemtype="http://schema.org/
Offer">
Price: Rs.<spanitemprop="price">1.00</span>
<metaitemprop="priceCurrency" content="INR" />
</div>
</div>
itemid - The unique, global identifier of an item.
itemprop - Used to add properties to an item.
itemref-Provides a list of element ids with additional properties.
itemscope - It defines the scope of the itemtype associated with it.
itemtype - Specifies the URL of the vocabulary that will be used to define itemprop.
The above example will be parsed by Google
82) which tag is used foutepresenting the result of a calculation? Explain its attributes.
Ans:- The <output> tag is used for representing the result of a calculation. It has the following attributes: ulation. I defines the relationship between the elements used in calculation and result. form - This is used to define the form the output element belongs to.
name - The name of the output element.
<formoninput= "result.value=parseInt(n1.value)+parseInt(n2.value)"> <inputtype = "number" name = "nl"value = "1" /> + <inputtype = "number" name = "n2"value = "2" /><br /> The output is: <outputname = "result"></output> </form>
83) What is new about the relationship between the <header> and <h1> tags in HTML5?
Ans: As HTML5 was all about better semantics and arrangements of the tags and elements, the <header> tag specifies the header section of the webpage. Unlike in previous version there was one <h1> element for the entire webpage, now this is the header for one section such as <article> or <section>. According to the HTML5 specification, each <header> element must at least have one <h1> tag.
87) Explain HTML5 Graphics.
Ans: HTML5 supports two kinds of graphics: Canvas - It is like drawing on a whitepaper or a blank webpage. We can add different graphic designs on web pages with available methods for drawing various geometrical shapes.
<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<canvaswidth="300" height="100" style="border:2px solid;"></
canvas>
88) What are the server-sent events in HTML5?
Ans: The events pushed from the webserver to the browsers are called server-sent events. DOM elements can be continuously updated using these events. This has a major advantage over straight up polling. In polling, there is a lot of overhead since every time it is establishing an HTTP connection and tearing it down whereas, in server-sent events, there is one long-lived HTTP connection. To use a server-sent event, <eventsource> element is used. The src attribute of this element specifies the URL from which sends a data stream
having the events. <eventsourcesrc="/cgi-bin/myfile.cgi" />
89) What are Web Workers?
Ans: These are added to bring parallelism and async capability. It runs in the background to do the computationally expensive tasks without yielding to make the page responsive. It is achieved by starting a separate thread for such tasks. These are not meant to perform UI operations. There are three types of web workers:
Dedicated Workers - These are workers that are utilized by a single script.
Shared Workers -These are workers that are utilized by multiple scripts running in different windows, IFrames, etc.
Service Workers - These act as proxy servers between web applications, the browser, and the network. Mostly used for push notifications and sync APIs.
<p>Count numbers: <outputid="result"></output></p>
<buttononclick="startWorker()">Start Worker</button>
<buttononclick="stop Worker()">Stop Worker</button>
<script>
var w;
functionstart Worker() {
if(typeof(Worker) != "undefined") {
if(typeof(w) == "undefined") {
w = new Worker("demo_workers.js");
}
w.onmessage = function(event) { document.getElementById("result").innerHTML = event.data;
90) What is the usage of a novalidate attribute for the form tag that is introduced in HTML5?
Ans: Its value is a boolean type that indicates whether or not the data being submitted by the form will be validated beforehand. By making this false, forms can be submitted without validation which helps users to resume later also.
<formaction = ""method="get"novalidate>
Name:<br><inputtype="name " name="sname"><br>
Doubt:<br><inputtype="number"name="doubt"><br> <inputtype="submit"value="Submit"> </form>
91) What are raster images and vector images?
Ans: Raster Images - The raster image is defined by the arrangement of pixels in a grid with exactly what color the pixel should be. Few raster file formats include PNG(.png), JPEG(.jpg), etc.
Vector Images - The vector image is defined using algorithms with shape and path definitions that can be used to render the image on-screen written in a similar markup fashion. The file extension is .svg
92) How to support SVG in old browsers?
Ans: To support old browsers instead of defining the resource of svg in src attribute of <img> tag, it should be defined in srcset attribute and in src the fallback png file should be defined. <imgsrc="circle.png"alt="circle" srcset="circle.svg">
-000000-
Explore all units: