HTML Technical Interview Questions For Freshers

Define HTML  Hypertext Markup Language, or HTML, is the language used to create web pages and display them on browsers. The two primary ...

Define HTML 
Hypertext Markup Language, or HTML, is the language used to create web pages and display them on browsers. The two primary components of HTML documents are the content and the tags. The tags are used to format the content that is displayed on web pages.

What are tags?
HTML tags use the less than symbol (<) and the greater than symbol (>) to indicate some modification of the content on the page. Additionally, the slash symbol is often used to signal a closing tag.

What is the difference between HTML elements and tags? 
HTML elements communicate to the browser how to render text. When surrounded by angular brackets <> they form HTML tags. For the most part, tags come in pairs and surround text.

Define URL? 
Uniform Resource Locator; an address that specifies the location of a file on the Internet.

What is the simplest HTML page? 
HTML Code:
<HTML>
<HEAD>
<TITLE>This is my page title! </TITLE>
</HEAD>
<BODY>
This is my message to the world!
</BODY>
</HTML>

What are various list tags in HTML?
  • unordered list 
  • ordered list 
  • directory list 
  • definition list 
  • menu list
How do you insert a comment in HTML?
An HTML comment begins with "<!--", ends with "-->", and does not contain "--" or ">" anywhere in the comment.
The following are examples of HTML comments:

* <!-- This is a comment. -->
* <!-- This is another comment,
and it continues onto a second line. -->
* <!---->

What does DOCTYPE mean? 
The term DOCTYPE tells the browser which type of HTML is used on a webpage. In turn, the browsers use DOCTYPE to determine how to render a page. Failing to use DOCTYPE or using a wrong DOCTYPE may load your page in Quirks Mode.

What are the various text formatting tag in HTML?
</b>
Defines bold text
<br />
Inserts a single line break
<center>
Deprecated. Defines centered text
<em>
Defines emphasized text
<hr/>
Defines a horizontal rule
<li>
Defines italic text
<p>
Defines a paragraph
<ul>
Deprecated. Defines underlined text
</ul></p></i></em></center></b>

How can use MARQUEE in HTML
marquee tag is used to display the text in blinked manner in only its supporting browsers.
<marquee height= width= scroll = direction= scroll amount=>text...
</marquee>

What Is th Reason for extra space before or after my table?
This is often caused by invalid HTML syntax. Specifically, it is often caused by loose content within the table (i.e., content that is not inside a TD or TH element). There is no standard way to handle loose content within a table. Some browsers display all loose content before or after the table. When the loose content contains only multiple line breaks or empty paragraphs, then these browsers will display all this empty space before or after the table itself.
The solution is to fix the HTML syntax errors. All content within a table must be within a TD or TH element.

Explain anchor tag in HTML ?
The <a>  tag defines an anchor. It can be used to create a link to another document by using the href attribute or to create a bookmark inside a document, by using the name or id attribute.<a> 

What is an image map? 
An image map allows you to link to several web pages through one image. Simply define shapes within images and link these to the pages you want.

What is the importance of Doctype in HTML? 
Doctype tag is not a HTML tag, it is just an instruction that is passed to the web browser to check for the information that is being provided by the markup language in which the page is written. Doctype is sometimes referred as Document type definition (DTD) that describes some rules that has to be followed while writing the markup language so to make the web browser understand the language and the content correctly. Doctype is very important to be placed in the beginning of the HTML and before the <html> tag to allow easy rendering of the pages that are used.</html> tag to allow easy rendering of the pages that are used.

What are the different types of entities in HTML?
The different types of entities that are present in HTML are < (less than) or > (greater then). It allows the special or the reserved characters are matched with the source code and then it is saved. The sample code is being given by:
&entity_name;
OR
&#entity_number;
There is always a concept associated with it that will create more simpler provision to avoid the spaces that are being coming in between the characters or the text.

What is a Hypertext link? 
 A hypertext link is a special tag that links one page to another page or resource. If you click the link, the browser jumps to the link's destination.

What is the purpose of iframe in HTML? 

Iframe is called as inline frame that places one HTML document in a frame. It is different from the object element as the inline frame can be made in the target frame. The target frame consists of the links that is defined by other elements used in the web page. Iframe is used to focus on printing or viewing of the source. Iframe can be used by the user in those browser that supports it. If they have used iframe also then the incompatible browser won’t display the actual but display of the alternative text will take place. The content of the iframe is being written in between <iframe>…… </iframe>.

What is the difference between <div> and <frame>
A <div> is a generic container element for grouping and styling, whereas a <frame> creates divisions within a web page and should be used within the <frameset> tag. The use of <frame> and <frameset> are no longer popular and are now being replaced with the more flexible <iframe>, which has become popular for embedding foreign elements (ie. Youtube videos) into a page.

How can tables created in HTML?
Tables can be made nested by making it come in another table. This consists of many attributes and tags that can be used in nesting the tables. The tags that are used for the table is as follows:
<tr>: This is the tag that has to be written after the

tag and before any other tags. This makes a table row that store the data elements. <td>: This tag can be used anywhere and it consists of the data that has to come on the website. <th>: This tag consists of the table heading. The sample code will explain the above explanation much better

<table>
<tr>
<td>this is the first cell</td>
<td>this is the second cell <table> <!--Starting of the table that is embedded inside another table->
<tr>
<td>this is the first cell second table</td>
<td>this is the second cell of second table</td>
</tr>
</table>
</td>
</tr>

</table>

What are the Web’s unique features?
  • universal readership
  • hyperlinks/hypertext/hypermedia
  • authoring for computers and humans
  • availability of information
  • felxibility to adapt to new forms of media
The web has become the most predominant of the new digital media, and has provided the mechanism for many new forms of publishing.

What is the difference between the application model of HTML and HTML5?
Trick question, there is no difference. HTML5 is a continuum of HTML and just a souped up version of the original HTML. There has been no major paradigm shift.

What are some new HTML5 markup elements?
<article>, <aside>, <bdi>, <command>, <details>, <figure>, <figcaption>, <summary>, <header>, <footer>, <hgroup>, <mark>, <meter>, <nav>, <progress>, <ruby>, <rt>, <section>, <time>, and <wpr>.

What are the new image elements in HTML5?
Canvas and WebGL. <Canvas> is a new element that acts as a container for graphical elements like images and graphics. Coupled with JavaScript, it supports 2D graphics. WebGL stands for Web Graphics Language, a free cross-platform API that is used for generating 3D graphics in web browsers

Describe the difference between cookies, sessionStorage, and localStorage.
Cookies are small text files that websites place in a browser for tracking or login purposes. Meanwhile, localStorage and sessionStorage are new objects, both of which are storage specifications but vary in scope and duration. Of the two, localStorage is permanent and website-specific whereas sessionStorage only lasts as long as the duration of the longest open tab.

What is the difference in caching between HTML5 and the old HTML?

An important feature of HTML5 is the Application Cache. It creates an offline version of a web application. and stores website files such as HTML files, CSS, images, and JavaScript, locally. It is a feature that speeds up site performance.





Related

Interview Questions 7107073011415358233

Post a Comment

Follow Us

Hot in week

Recent

Comments

Side Ads

item