21⟩ Tell me what is the use of Canvas element?
The canvas element helps to build charts, graphs, bypass Photoshop to create 2D images and place them directly into HTML5 code.
“HTML Developer Frequently Asked Questions in various HTML Developer job interviews by interviewer. The set of questions are here to ensures that you offer a perfect answer posed to you. So get preparation for your new job interview”
The canvas element helps to build charts, graphs, bypass Photoshop to create 2D images and place them directly into HTML5 code.
The Application Cache concept means that a web application is cached. It can be accessible without the need for internet connection.
A great question to feel out the depth of the applicants knowledge and experience.
A web application is an application utilizing web and [web] browser technologies to accomplish one or more tasks over a network, typically through a [web] browser.
HTML5 was designed to replace both HTML 4, XHTML, and the HTML DOM Level 2.
Major goals of the HTML specification were to:
☛ Deliver rich content (graphics, movies, etc.) without the need for additional plugins (e.g., Flash).
☛ Provide better semantic support for web page structure through the introduction of new structural element tags.
☛ Provide a stricter parsing standard to simplify error handling, ensure more consistent cross-browser behavior, and simplify backward compatibility with documents written to older standards.
☛ Provide better cross-platform support (i.e., to work well whether running on a PC, Tablet, or Smartphone).
Content is placed in between HTML tags in order to properly format it. It makes use of the less than symbol (<) and the greater than symbol (>). A slash symbol is also used as a closing tag. For example:
<strong>sample</strong>
Comments in html begins with “<!–“nd ends with “–>”. For example:
<!-- A SAMPLE COMMENT -->
When you use image maps, it can easily become confusing and difficult to determine which hotspots corresponds with which links. Using alternative text lets you put a descriptive text on each hotspot link.
Although checkboxes don’t affect one another, grouping checkboxes together helps to organize them. Checkbox buttons can have their own name and do not need to belong to a group. A single web page can have many different groups of checkboxes.
The key differences is that the directory and menu lists do not include attributes for changing the bullet style.
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.
This tag represents a piece of self-contained flow content. It is mostly used as a single unit as a reference the main flow of the document.
Get
With GET the form data is encoded into a URL by the browser. The form data is visible in the URL allowing it to be bookmarked and stored in web history. The form data is restricted to ASCII codes. Because URL lengths are limited there can be limitations on how much form data can be sent.
Post
With POST all the name value pairs are submitted in the message body of the HTTP request which has no restrictions on the length of the string. The name value pairs cannot be seen in the web browser bar.
POST and GET correspond to different HTTP requests and they differ in how they are submitted. Since the data is encoded in differently, different decoding may be needed.
Key new features of HTML5 include:
Improved support for embedding graphics, audio, and video content via the new <canvas>, <audio>, and <video> tags.
Extensions to the JavaScript API such as geolocation and drag-and-drop as well for storage and caching.
Introduction of “web workers”.
Several new semantic tags were also added to complement the structural logic of modern web applications. These include the <main>, <nav>, <article>, <section>, <header>, <footer>, and <aside> tags.
New form controls, such as <calendar>, <date>, <time>, <email>, <url>, and <search>.
Two main benefits of HTML5 Web Storage:
☛ It can store up to 10 MB data which is certainly more than what cookies have.
☛ Web storage data cannot be transferred with the HTTP request. It helps to increase the performance of the application.
Implementation largely depends on the browser, but the standard does not support fractional weight values. Acceptable values must end with two zeroes.
To create hyperlinks, or links that connect to another web page, use the href tag. The general format for this is: <a href=”site”>text</a>
Replace “site” with the actual page url that is supposed to be linked to when the text is clicked.
<table>
<tr>
<td>10 pcs</td>
<td>200</td>
<td>300</td>
</tr>
<tr>
<td>20 pcs</td>
<td>3</td>
<td>40</td>
</tr>
</table>
Links can be created using the <a> tag, with referencing through the use of the number (#) symbol. For example, you can have one line as <a href=”#topmost”>BACK TO TOP</a>, which would result in the words “BACK TO TOP” appearing on the webpage and links to a bookmark named topmost. You then create a separate tag command like <a name=”topmost”> somewhere on the top of the same webpage so that the user will be linked to that spot when he clicked on “BACK TO TOP”.
You can insert any or a combination of the following list types:
☛ ordered list
☛ unordered list
☛ definition list
☛ menu list
☛ directory list
Each of this list types makes use of a different tag set to compose
In HTML5, the encoding used can be indicated with the charset attribute of a <meta> tag inside the document’s <head> element:
<!DOCTYPE html>
<html>
<head>
...
<meta charset="UTF-8">
...
</head>
...
</html>
This is a slightly simpler syntax from older HTML standards, which did not have the charset attribute. For example, an HTML 4.01 document would use the <meta> tag as follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
...
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
...
</head>
...
</html>