HTML Interview Questions - Javatpoint
HTML Interview Questions - Javatpoint
HTML Interview Questions - Javatpoint
1) What is HTML?
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. More details...
HTML tags are composed of three things: opening tag, content and ending tag.
Some tags are unclosed tags.
content, and
tags
Content is placed between tags to display data on the web page. More details...
No. There are some HTML tags that don't need a closing tag. For example:
<image> tag, <br> tag. More details...
There are many common lists which are used to design a page. You can choose any
or a combination of the following list types:
Ordered list
Unordered list
Menu list
⇧
Directory list
Definition list
https://www.javatpoint.com/html-interview-questions 1/9
16/07/2017 HTML Interview Questions - javatpoint
More details...
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.
Semantic HTML is a coding style. It is the use of HTML markup to reinforce the
semantics or meaning of the content. For example: In semantic HTML <b> </b>
tag is not used for bold statement as well as <i> </i> tag is used for italic. Instead
of these we use <strong></strong> and <em></em> tags.
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.
No, you can use hyperlinks on text and images both. More details...
A style sheet is used to build a consistent, transportable, and well designed style
template. You can add these templates on several different web pages.
Yes. To create a multicolor text on a web page you can use <font color ="color">
</font> for the specific texts you want to color.
The color of the bullet is always the color of the first text of the list. So, if you want
to change the color of the bullet, you must change the color of the text.
Marquee is used to put the scrolling text on a web page. You should put the text
which you want to scroll within the <marquee>......</marquee> tag. More details...
There are three tags used to separate the texts. i.e. usually <br> tag is used to
separate line of texts. Other tags are<p> tag and <blockquote> tag.
To make a picture a background image on a web page, you should put the following
tag code after the </head> tag.
Here, replace the "image.gif" with the name of your image file which you want to
display on your web page.
⇧
17) What are empty elements?
https://www.javatpoint.com/html-interview-questions 3/9
16/07/2017 HTML Interview Questions - javatpoint
HTML elements with no content are called empty elements. For example: <br>,
<hr> etc.
Example:
1. <p>
2. <span style="color:#ffffff;">
4. </span>
5. </p>
Syntax:
1. <iframe src="URL"></iframe>
Example:
Target to a link:
https://www.javatpoint.com/html-interview-questions 4/9
16/07/2017 HTML Interview Questions - javatpoint
HTML SVG is used to describe the two dimensional vector and vector/raster
graphics. More details...
22) What are the different new form element types in HTML
5?
Color
Date
Datetime-local
Time
Url
Range
Telephone
Number
Search
No. Almost all browsers (updated versions) support HTML 5. For example: Chrome,
Firefox, Opera, Safari, IE etc.
mp4
webm
ogg
More details...
Yes. It is used to add sound or music files on the web page. More details...
https://www.javatpoint.com/html-interview-questions 5/9
16/07/2017 HTML Interview Questions - javatpoint
The progress tag is used to represent the progress of the task only while the meter
tag is used to measure data within a given range. More details...
The figure tag is used to add a photo in the document on the web page. More
details...
The button tag is used in HTML 5. It is used to create a clickable button within HTML
form on the web page. It is generally used to create a "submit" or "reset" button.
More details...
The details tag is used to specify some additional details on the web page. It can be
viewed or hidden on demand. The summary tag is used with details tag. More
details...
The HTML 5 datalist tag provides an auto complete feature on form element. It
facilitates users to choose the predefined options. More details...
1. <div id="header">
2. <h1>Monday Times</h1>
3. </div>
4. .
5. .
6. .
7. <div id="footer">
9. </div>
1. <header>
2. <h1>Monday Times</h1>
3. </header>
4. .
5. .
6. .
7. <footer>
9. </footer>
Menu Example
HTML 4 Menu:
1. <div id="menu">
2. <ul>
3. <li>News</li>
4. <li>Sports</li>
5. <li>Weather</li>
6. </ul>
7. </div>
HTML 5 Menu:
1. <nav> ⇧
2. <ul>
3. <li>News</li>
https://www.javatpoint.com/html-interview-questions 7/9
16/07/2017 HTML Interview Questions - javatpoint
4. <li>Sports</li>
5. <li>Weather</li>
6. </ul>
7. </nav>
No, browser will not be able to identify that it is a HTML document and HTML 5 tags
will not function properly.
It forces user to fill text on textfield or textarea before submitting form. It is used
for form validation.
Example:
34) What are the new <input> types for form validation in
HTML5?
The new input types for form validation are email, url, number, tel and date.
Example:
1. <input type="email">
https://www.javatpoint.com/html-interview-questions 8/9
16/07/2017 HTML Interview Questions - javatpoint
https://www.javatpoint.com/html-interview-questions 9/9