Banner link

Watches for Girl's

Thursday, June 28, 2018

HTML Interview Questions


HTML Interview Questions


Html Tag
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.

2) What are Tags?
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:
o             content, and
o             tags
Content is placed between tags to display data on the web page. 

3) Do all HTML tags have end tag?
No. There are some HTML tags that don't need a closing tag. For example: <image> tag, <br> tag.

4) What are some common lists that are used when designing a page?
There are many common lists which are used to design a page. You can choose any or a combination of the following list types:
o             Ordered list
o             Unordered list
o             Menu list
o             Directory list
o             Definition list

5) What is the difference between HTML elements and tags?
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?
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.

7) What is image map?
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?
can insert a copyright symbol by using &copy; or &#169; in an HTML file.

9) How do you keep list elements straight in an HTML file?
You can keep the list elements straight by using indents.

10) Does a hyperlink only apply to text?
No, you can use hyperlinks on text and images both.

11) What is a style sheet?
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.

12) Can you create a multi colored text on a web page?
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.

13) Is it possible to change the color of the bullet?
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.

14) What is a marquee?
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.

15) How many tags can be used to separate section of texts?
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.

16) How to make a picture a background image of a web page?
To make a picture a background image on a web page, you should put the following tag code after the </head> tag.
                <body background = "image.gif"> 
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?
HTML elements with no content are called empty elements. For example: <br>, <hr> etc.

18) What is the use of span tag? Give one example.
The span tag is used for following things:
o             For adding color on text
o             For adding background on text
o             Highlight any color text etc.
Example:
1.            <p> 
2.            <span style="color:#ffffff;"> 
3.            In this page we use span. 
4.            </span> 
5.            </p> 

19) What is the use of iframe tag?
An iframe is used to display a web page within a web page.
Syntax:
                <iframe src="URL"></iframe> 
Example:
                <iframe src="demo_iframe.html" width="200px" height="200px"></iframe> 
Target to a link:
                <iframe src="http://www.javatpoint.com" name="iframe_a"></iframe> 

20) What is canvas in HTML5?
Canvas is an HTML area which is used to draw graphics.

21) What is SVG?
HTML SVG is used to describe the two dimensional vector and vector/raster graphics.
22) What are the different new form element types in HTML 5?
Following is a list of 10 important new elements in HTML 5:
o             Color
o             Date
o             Datetimelocal
o             Email
o             Time
o             Url
o             Range
o             Telephone
o             Number
o             Search
23) Is there any need to change the web browsers to support HTML5?

No. Almost all browsers (updated versions) support HTML 5. For example: Chrome, Firefox, Opera, Safari, IE etc.

24) Which video formats are supported by HTML5?
HTML 5 supports three types of video format:
o             mp4
o             webm
o             ogg

 25) Is audio tag supported in HTML 5?
Yes. It is used to add sound or music files on the web page.

26) What is the difference between progress and meter tag?
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.

27) What is the use of figure tag in HTML 5?
The figure tag is used to add a photo in the document on the web page.

28) What is button tag?
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.

29) What does details and summary tag?
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.

30) What is datalist tag?
The HTML 5 datalist tag provides an auto complete feature on form element. It facilitates users to choose the predefined options.

31) How tags are migrated from HTML4 to HTML5?




No.         Typical HTML4   Typical HTML5
1)            <div id="header">           <header>
2)            <div id="menu">             <nav>
3)            <div id="content">         <section>
4)            <div id="post">                <article>
5)            <div id="footer">            <footer>
Header and Footer Example
HTML 4 Header and Footer:
1.            <div id="header"> 
2.              <h1>Monday Times</h1> 
3.            </div> 
7.            <div id="footer"> 
8.              <p>&copy; JavaTpoint. All rights reserved.</p> 
9.            </div> 
HTML 5 Header and Footer:
1.            <header> 
2.              <h1>Monday Times</h1> 
3.            </header> 
7.            <footer> 
8.              <p>© JavaTpoint. All rights reserved.</p> 
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> 
4.                <li>Sports</li> 
5.                <li>Weather</li> 
6.              </ul> 
7.            </nav> 
32) If I do not put <!DOCTYPE html> will HTML 5 work?
No, browser will not be able to identify that it is a HTML document and HTML 5 tags will not function properly.

33) What is the use of required attribute in HTML5?
It forces user to fill text on textfield or textarea before submitting form. It is used for form validation.
Example:
                Name: <input type="text" name="name" required> 
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:
                <input type="email"> 




---------------------------------------------------------Soni  Annadate ---------------------------------------------

1 comment:

  1. This is really a very good blog and thanks for sharing it with the community !
    Keep Posting Many Blogs Like this.
    SEO Company in Pune
    SEO Services in Pune

    ReplyDelete

Featured Post

‘Viswasam’ first look: Ajith Kumar