1) What is HTML?
Ans)HTML stands for Hyper Text Markup Language. It is a language of World Wide Web. It is a standard text formatting language which is used to create and display pages on the Web.
2) What are Tags?
Ans) HTML tags are composed of three things: opening tag, content and ending tag. Some tags are unclosed tags. HTML documents are made of two things:
3) Do all HTML tags have end tag?
Ans) No. There are some HTML tags that don't need a closing tag.For example:
4) What are some common lists that are used when designing a page?
Ans) There are many common lists which are used to design a page. You can choose any or a combination of the following list types:
5) What is the difference between HTML elements and tags?
Ans) HTML elements communicate to the browser to render text. When the elements are surrounded by brackets <>, they form HTML tags. Most of the time, tags come in pair and surround content.
6) What is semantic HTML?
7) What is image map?
Ans) Image map facilitates you link many different web pages using a single image. You can define shapes in images that you want to make part of an image mapping.
8) How to insert a copyright symbol on a browser page?
Ans) can insert a copyright symbol by using © or © in an HTML file.
9)How do you keep list elements straight in an HTML file?
Ans)You can keep the list elements straight by using indents.
10)Does a hyperlink only apply to text?
Ans) No, you can use hyperlinks on text and images both.
11) Do all HTML tags come in a pair?
Ans) No, there are single HTML tags that do not need a closing tag. Examples are the tag and
tags.
12) How do you insert a comment in HTML?
Comments in HTML begins with “”. For example:
13) Do all character entities display properly on all systems?
No, there are some character entities that cannot be displayed when the operating system that the browser is running on does not support the characters. When that happens, these characters are displayed as boxes.
14) What is the advantage of collapsing white space?
Ans) White spaces are a blank sequence of space characters, which is treated as a single space character in HTML. Because the browser collapses multiple spaces into a single space, you can indent lines of text without worrying about multiple spaces. This enables you to organize the HTML code into a much more readable format.
15) How do you create links to sections within the same page?
16) Is there any way to keep list elements straight in an HTML file?
Ans) Every web page on the web can have a separate web address. Most of these addresses are relative to the top-most web page. The published web address that appears within magazines typically points this top-most page. From this top level page, you can access all other pages within the website.
17) What is the use of alternative text in image mapping?
Ans) When you use image maps, it can easily become confusing and difficult to determine which hotspots correspond to which links. Using alternative text lets, you put a descriptive text on each hotspot link.
18) Do older HTML files work on newer browsers?
Ans) Yes, older HTML files are compliant to the HTML standard. Most older files work on the newer browsers, though some features may not work.
19) Does a hyperlink apply to text only?
20) If the user’s operating system does not support the needed character, how can the symbol be represented?
Ans) In cases wherein their operating system does not support a particular character, it is still possible to display that character by showing it as an image instead.
21) How do you change the number type in the middle of a list?
22) State bullet types available in HTML
Ans) With ordered lists, you can select to use some different list types including alphabetical and Roman numerals. The type attribute for unordered lists can be set to disc, square, or circle.
23) How do you create multicolored text in a webpage?
24) Why are there both numerical and named character entity values?
Ans) The numerical values are taken from the ASCII values for the various characters, but these can be difficult to remember. Because of this, named character entity values were created to make it easier for web page designers to use.
25) Write an HTML table tag sequence that outputs the following:
Ans) 50 pcs 100 500 10 pcs 5 50
50 pcs | 100 | 500 |
10 pcs | 5 | 50 |
Ans) Applets are small programs that can be embedded within web pages to perform some specific functionality, such as computations, animations, and information processing. Applets are written using the Java language.
27) What will happen if you overlap sets of tags?
Ans) If two sets of HTML tags are overlapped, only the first tag will be recognized. You will find this problem when the text does not display properly on the browser screen.
28) What if there is no text between the tags or if a text was omitted by mistake? Will it affect the display of the HTML file?
Ans) If there is no text between the tags, then there is nothing to format. Therefore no formatting will appear. Some tags, especially tags without a closing tag like the tag, do not require any text between them.
29) Is it possible to set specific colors for table borders?
Ans) You can specify a border color using style sheets, but the colors for a table that does not use style sheets will be the same as the text color.
30) How do you create a link that will connect to another web page when clicked?
Ans) To create hyperlinks, or links that connect to another web page, use the href tag. The general format for this is: text Replace “site” with the actual page URL that is supposed to be linked to when the text is clicked.
31) What other ways can be used to align images and wrap text?
Ans) Tables can be used to position text and images. Another useful way to wrap text around an image is to use style sheets.
32) Can a single text link point to two different web pages?
33) What is the difference between the directory and menu lists and the unordered list?
Ans) The key difference is that the directory and menu lists do not include attributes for changing the bullet style.
34) Can you change the color of bullets?
35) What are the limits of the text field size?
Ans) The default size for a text field is around 13 characters. However, if you include the size attribute, you can set the size value to be as low as 1. The maximum size value will be determined by the browser width. If the size attribute is set to 0, the size will be set to the default size of 13 characters.
37) What is the relationship between the border and rule attributes? 38) What is a marquee? 39) How do you create text on a webpage that will allow you to send an email when clicked? tag and 41) How are active links different from normal links? Ans) The default color for normal and active links is blue. Some browsers recognize an active link when the mouse cursor is placed over that link; others recognize active links when
the link has the focus. Those that don’t have a mouse cursor over that link is considered a normal link. 42)Do style sheets limit the number of new style definitions that can be included within the brackets? Ans) Style sheets do not limit the number of style definitions that can be included within the brackets for a given selector.
Every new style definition, however, must be separated from the others by a semicolon symbol. 43) Can I specify fractional weight values such as 670 or 973 for font weight? Ans) Implementation largely depends on the browser, but the standard does not support fractional weight values. Acceptable values must end with two zeroes.
44) Can several selectors with class names be grouped together? Ans) You can define several selectors with the same style definition by separating them with commas. This same technique also works for selectors with class names. 45) What is the hierarchy that is being followed when it comes to style sheets? Ans) If a single selector includes three different style definitions, the definition that is closest to the actual tag takes precedence. Inline style takes priority over embedded style sheets, which takes priority over external style sheets. 46)What happens if you open the external CSS file in a browser? Ans) When you try to open the external CSS file in a browser, the browser cannot open the file, because the file has a different extension.
The only way to use an external CSS file is to reference it using tag within another HTML document.
47)What happens if the list-style-type property is used on a non-list element like a paragraph? Ans) If the list-style-type property is used on a non-list element like a paragraph, the property will be ignored and do not affect the paragraph. 48) When is it appropriate to use frames? Ans) Frames can make navigating a site much easier. If the main links to the site are located in a frame that appears at the top or along the edge of the browser, the content for those links can be displayed in the
remainder of the browser window. 49 )What is the relationship between SGML,HTML , XML and XHTML? Ans) SGML (Standard generalized markup language) is a standard which tells how to specify document markup. It’s only a Meta language which describes how a document markup should be. HTML is a markup language which is described using SGML.
So by SGML they created DTD which the HTML refers and needs to adhere to the same. So you will always find “DOCTYPE” attribute at the top of HTML page which defines which DTD is used for parsing purpose. Ans) No, browser will not be able to identify that it’s a HTML document and HTML 5 tags will not function properly.
51) Which browsers support HTML 5? Ans)Almost all browsers i.e. Safari, Chrome, Firefox, Opera, Internet Explorer support HTML 5. 52) What is datalist in HTML 5? Ans) Datalist element in HTML 5 helps to provide autocomplete feature in a textbox 53)What happens if the number of values in the rows or cols attribute doesn’t add up to 100 percent? Ans) The browser sizes the frames relative to the total sum of the values. If the cols attribute is set to 100%, 200% the browser displays two vertical frames with the second being twice as big as the first.
54) Name two new tags included in the HTML 5? 55) Do you know which are two semantic tags are included in HTML5 version?
57)What is the use of Canvas element? Ans) The canvas element helps to build charts, graphs, bypass Photoshop to create 2D images and place them directly into HTML5 code.
58) What are the new FORM elements which are available in HTML5? Ans)The new Form elements in HTML5 offers much better functionality than the earlier versions.
59) Tell me two benefits of HTML5 Web Storage Ans) Two main benefits of HTML5 Web Storage:
60) What are two types of Web Storage in HTML5? Ans) The CSS box model is used to define the design and layout of elements of CSS.
Two storage types of HTML5 are:
Session Storage: Local Storage: 61) What is the Application Cache in HTML5 and why it is used? Ans) The Application Cache concept means that a web application is cached. It can be accessible without the need for internet connection.
Some advantages of Application Cache: 62) Explain five new input types provided by HTML5 for forms? Ans) Following are the important, new data types offered by HTML5:
63) What is local storage concept in HTML 5? Ans) Many times we would like to store information about the user locally in the computer. For example let’s say user has half-filled a long form and suddenly the internet connection breaks off. So the user would like you to store this information locally and when the internet comes back.He would like to get that information and send it to the server for storage.
Modern browsers have storage called as “Local storage” in which you can store this information. 64) What is WebSQL? Ans) WebSQL is a structured relational database at the client browser side. It’s a local RDBMS inside the browser on which you can fire SQL queries. 65) Is WebSQL a part of HTML 5 specification? 66) What is fallback in Application cache? Ans)This accepts only URL value. This type is used for input fields that should contain a URL address. If you try to submit a simple text, it forces to enter
only URL address either in http://www.example.com format or in http://example.com format.. 68)What is the purpose of 'output' tag in HTML5? 69) What is the purpose of 'placeholder' attribute in HTML5? 70) What is the purpose of 'autofocus' attribute in HTML5? 71) What is the purpose of 'required' attribute in HTML5? Ans) HTML5 introduced a new attribute called required which would insist to have a value in an input control.. 72) Can you use SVG tags directly in HTML5 without any plugin? 73)Can you use MathML tags directly in HTML5 without any plugin? 74)What are the drawbacks of cookies? Ans) Cookies have following drawbacks−
75) What do you mean by session storage in HTML5? Ans) HTML5 introduces the sessionStorage attribute which would be used by the sites to add data to the session storage, and it will be accessible to any page from the same
site opened in that window i.e. session and as soon as you close the window, session would be lost.
76)When a session storage data gets deleted? Ans) The Session Storage Data would be deleted by the browsers immediately after the session gets terminated.
77) When a local storage data gets deleted? 78)What is Server Side Events in HTML5? Ans) Along with HTML5, WHATWG Web Applications 1.0 introduces events which flow from web server to the web browsers and they are
called Server-Sent Events (SSE). Using SSE you can push DOM events continously from your web server to the visitor's browser. The event streaming approach opens a persistent connection to the server, sending data to the client when new information is available,
eliminating the need for continuous polling. Server-sent events standardizes how we stream data from the server to the client. 79) How to utilize a server-sent event in HTML5? 80) What are the steps of server side scripts for SSE? 81) What are web sockets? Ans) Web Sockets is a next-generation bidirectional communication technology for web applications which operates over a single socket and is exposed via a JavaScript interface in HTML 5 compliant browsers.
Once you get a Web Socket connection with the web server, you can send data from browser to server by calling a send() method, and receive data from server to browser by an onmessage event handler.
Following is the API which creates a new WebSocket object.
var Socket = new WebSocket(url, [protocal] );
Here first argument, url, specifies the URL to which to connect. The second attribute, protocol is optional, and if present,
specifies a sub-protocol that the server must support for the connection to be successful. 82) What is the purpose of Socket.readyState atribute of WebSocket? Ans) The readonly attribute readyState represents the state of the connection. It can have the following values:
83) What is the purpose of Socket.bufferedAmount atribute of WebSocket? 84)What is the purpose of 'audio' tag in HTML5? 85) What is the purpose of 'video' tag in HTML5? 86) What is Geolocation API in HTML? 87) What is purpose of getCurrentPosition() method of geolocation object of HTML5? 88) What is purpose of watchPosition() method of geolocation object of HTML5? Ans) This method retrieves periodic updates about the current geographic location of the device. 89) What is purpose of clearPosition() method of geolocation object of HTML5? 90) What are Web Workers? Ans) Web Workers do all the computationally expensive tasks without interrupting the user interface and typically run on separate threads. Web Workers allow for long-running scripts that are not interrupted by scripts that respond to clicks or other user interactions, and allows
long tasks to be executed without yielding to keep the page responsive. 91)What are the extension supported by HTML? Ans) HTML supports both .htm and .html extension. 92) How to open a link in new tab or window? 93) What are the different types of Headings supported by HTML? 94) Explain HTML blocks? 95) What is the difference between get and post method? Ans) HTML methods sends request using get an post method. GET post request data from the server and POST is used to submit data to the server. 96) What is iframes? Why is recommended to avoid iframes? 97) How to redirect using HTML? 98) How to create emails links? 99)Do all HTML tags come in pair? 100) What is the advantage of collapsing white space? Ans) 1.The browser collapses the multiple white spaces into a single white space in HTML. tags always need to come at the start of a row or column?
tag can be changed to a tag. This causes the text contained within the tag to be displayed as bold in the browser. Although tags are mainly used for headings, they do not need to be used exclusively for headings.
tag.
tags the only way to separate sections of text?
tag is only one way to separate lines of text. Other tags, like the tag, also separate sections of text.
to
.
2.This allows the developers to arrange the HTML code in a well organized and legible format.