
When it comes to building a web application, the three main technologies that act as a building block for the development of a web application are HTML, CSS, and Javascript. To make a website appear good and function as expected, we need a minimum of these technologies. HTML is the backbone of the entire web application, without HTML the web application cannot exist. As for CSS and Javascript, a website can be created without these, but such a website would be of no use.
Introduced by Tim Berners-Lee, HTML stands for HyperText Markup Language. It is an open source technology, which means it is not owned by anyone in particular and can be used without any cost. HTML provides data to the user in a way that the user can query or lookup for more information just by clicking a highlighted word (a link or image etc.) or by navigating from one HTML page to another. It is made up of tags (<>) which annotate text.
HTML 1.0: It was the first release but had very limited usage.
HTML 2.0: Released by adding some new features to HTML 1.0, this was the standard application for website development.
HTML 3.0: Due to improper standards of the existing version of HTML, popular browser developer Netscape Navigator had some of its own tags. This is when HTML 3.0 was introduced.
HTML 3.2: This version stopped the non-standardized HTML by introducing World Wide Web Consortium (in short W3C) to keep the language standardized.
HTML 4.0: Created an evolution as the browser support was undertaken by Microsoft in their Internet Explorer (IE).
HTML 5.0: The current version of HTML which was introduced especially to work with any type of devices like mobile, tablets, large monitors etc.
When it comes to interviews for web developers, HTML plays a minor role as it is very easy to learn and use. The interview can also last for only one round asking questions about some of the regularly used tags or listing out the differences between HTML versions (4 & 5). Below are some of the commonly asked interview questions for HTML5 web application:
The <!DOCTYPE HTML> indicates the version of HTML which in this case is 5. The earlier versions like HTML4 were based on Standard Generalized Markup Language (SGML) and required a Document Type Definition (DTD). HTML5 however, is not based on SGML and doesn’t need a DTD.
HTML5 introduced few structural elements to define different parts of a web page like article, header, footer, main, mark and many more.
These are sections in which a web page is usually divided into. In HTML4, the same was implemented using div with an id/class name to it.
It defines space for an article that is independently distributable. For example, A magazine or newspaper article.
A horizontal line can be produced on a web page using the <hr> tag. The other point to note about the hr tag is that it doesn’t have an end tag as most of the HTML tags do.
The HTML div tag (ie <div>...</div>) is used to create a section of a web page. It can hold another sections or elements in it. It is also possible to hold direct text in it, but not the one that is used.
HTML holds 6 types of headings starting from h1 to h6. The heading one (h1) is the maximum font and h6 is the minimum font.
All the heading tags or elements can be grouped together in hgroup tag:
<hgroup>
<h1>Main heading</h1>
<h2>Subheading</h2>
</hgroup>
A span tag is similar to div section but is used to divide the screen into even smaller sections. <span>...</span>
Meta tags are the tags that provide more information to our web pages. Some of the tags that are examples for meta are:
Link: Defines a relation between the web page and an external source.
Style: Inserts styles (CSS) details to the web page.
Title: Provides a title to the web page.
You may also like: Top 5 Skills That Make You A Sure Shot Programmer
The list tags are used to list out any information. There are types in listing out the information using the tags, these are:
Ordered List: Used as <ol>...</ol> and provides the list in a numbered format.
Unordered List: Used as <ul>...</ul> and provides the list in a bullet format.
NOTE: both the above use list item tags ie <li>...</li> in them
Definition List: Used as <dl>...</dl> which provides a list in it and takes Definition Term (ie <dt>...</dt>) and a detailed definition (ie <dd>...</dd>).
The <fieldset> tag can be used to group some of the form elements. When the purpose is to provide some HTML elements as a group to the user then, fieldset tag is the best one to use. It takes another tag in it <legend> which provides a title to the grouped elements.
An input tag can take some attributes based on the requirement. ie <input type=”text”> creates a textbox that takes text/number/special characters into it. The attribute type can take more values, these are:
Datetime: Gives a datetime accepted textbox.
Placeholder: Places an editable text in the textbox.
Number: Takes only numbers and no text and special characters.
Tel: Takes inputs like a telephone number.
Email: Takes text with email format.
As there is no direct key to type and insert the copyright symbol in a web page, it has to be given by combining different characters. This can be done in multiple ways like:
©.
& #169.
A hyperlink is a text/image on a webpage, which when clicked redirects to a new webpage.
The type attribute helps to change the listing/numbering of the list items. It is also used to change the numbering index the value attribute is used.
HTML elements can be colored in three ways:
Color name ie red/blue etc.
Hex Color ie #efefef, and
RGB(10,234,128) which is a combination of red, green, blue.
In HTML 5 data storage can be done in two ways:
Session Storage: The current session (i.e., a user who is browsing the website) details are stored. Once the user closes the browser, the storage is cleared.
Local Storage: Data stored in local storage will not be cleared automatically or when the user closes the browser.
HTML5 has two types of providing graphics, SVG and Canvas. SVG is helpful when using devices like tablets, iPads etc. Whereas, Canvas is an area in the document or HTML page where graphics can be drawn.
You may also like: Top 40 Spring Interview Questions and Answers (Updated for 2018)
The events that come from the server to the browser are termed as Server Side Events.
HTML5 has introduced two new attributes for the form tag which are:
autocomplete.
non-validate.
The form attribute novalidate is a Boolean type which takes true/false values. If disabled or made false, the form data is not validated when submitted.
The autocomplete attribute is usually applied to text boxes with which the user can fill the textboxes with the previous values given to it.
It is not possible to hide the HTML source code as the browser needs to understand the code.
The meta tag has an attribute called URL which takes you to a redirected link.
Cell Padding refers to the space between the cell wall and cell border.
The three kinds of Doctypes which are available:
Strict Doctype
Transitional Doctype
Frameset Doctype
HTML code can be commented using <!-- all the code written here will be commented -->
The available API’s in HTML are:
DOM Level 1
DOM Level 2 Core
DOM Level 2 HTML
DOM Level 3
Application Cache is a mechanism in which the web applications can also run offline. One of the advantages of using the application cache is that the resources load faster.
This tag is also known as a gauge and is used to define a scalar measurement which is in a known range.
The cite tag is used to represent the title of a work (like a book, paper, poem etc). This tag is mostly used as an inline tag.
This attribute is a new feature in HTML5 using which any element can be edited directly from the browser.
Using Web Workers APIs provide a way to run something in the background with which certain tasks can be performed without distracting the user interface.
MathML stands for Mathematical Markup Language and is used to show mathematical and scientific content on the web page. This expression should be inserted in a math tag.
WHATWG stands for Web HyperText Application Technology Working Group which is an organization that develops and also maintains the HTML and API for web applications.
Using Microdata, the metadata is nested within existing content on web pages. Search engines extract the microdata from a web page to provide a good browsing experience.
Related reading Top 55 Java Interview Questions and Answers for 2018
HTML5 holds some new and old formatting elements, all together here is the list:
Marked text
Emphasized text
Subscripts
Superscripts
Small text
Deleted text
Inserted text
HTML stands for HyperText Markup Language and XHTML stands for eXtensible HyperText Markup Language which is defined in XML format.
API stands for Application Programming Interfaces and is a way to create applications. They use pre-built components. Using the available APIs, developers can integrate the features into their websites.
The HTML5 standard introduced a number of new APIs. Here is a small list:
Constraint Validation API
Text Track API
Media API
Command API
User Interaction
Data Transfer API
History API
Application Cache API
With the introduction of application cache, a web application is accessible without an internet connection. Every page of the web application should hold the manifest attribute to get cached.
By default, the font size in a browser is 16px and can be increased or decreased in the browser settings. 1em equals the font-size given in the browser. Whereas, the rem value depends on root element that is HTML tag.
A form has an action attribute that takes two values, Post and Get (default). The Post method is used to submit (insert\update\delete) data whereas, Get method is used to get some data.
HTML5 has introduced a database connection to store values on the client side. Web SQL is such a database in the browser which holds client information. It is important to note that Web SQL does not store critical data (like passwords) in it.
A minimum of 3 tags (HTML, head, and body) are required to create a working HTML page.
HTML is considered as a very minor technology, but many elements have been introduced with the release of the latest HTML version 5 and there is now a very high chance that the professionals will be posed with more questions based on HTML5 in the job interviews. It is, therefore, advised that both freshers and experienced must know and understand the differences between the version 4 & 5.
HTML can be considered as the very base of web technologies as this is the very first technology that is used to create a web page. Professionals who are willing to make their career in web technology must learn HTML. Not only is HTML one of the cornerstones of web technology, but is also used to develop applications for phones and tablets too.
Another interesting read by the author: Top 30 Interview Questions and Answers on Angular 5
surya 2019-07-29 12:26:02 +0530