HTML Interview Questions And Answer
In the Interview candidate often face the HTML Interview Questions when they meet on viva board . Before facing viva board the developer should prepare of html questions that they are often faced in the interview . In here we have given some html questions which is faced by the developers many times . We are encourage developer to prepare this html questions before facing HTML Interview .
1. What is Html ?
Ans: HTML stands for Hyper Text Markup Language and 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 and It makes the text more interactive and dynamic. Html can turn text into images, tables, links
2. What is formatting in HTML ?
Ans: The HTML formatting is a process of format the text for a better look and feel good and It uses different tags to make text bold, italicized, underlined.
3. How to create a hyperlink in HTML ?
Ans:The HTML provides an anchor tag to create a hyperlink that links one page to another page and these tags can appear in any of the following ways:
- Unvisited link: It is displayed, underlined and blue
- Visited link: It is displayed, underlined and purple
- Active link: It is displayed, underlined and red.
4. Which HTML tag is used to display the data in the tabular form ?
Ans:The HTML table tag: is used to display data in tabular form (row * column) and It also manages the layout of the page, e.g., header section, navigation bar, body content, footer section. Here is a list of tags used while displaying the data in the tabular form:
|<table>||It defines a table.|
|<tr>||It defines a row in a table.|
|<th>||It defines a header cell in a table.|
|<td>||It defines a cell in a table.|
|<caption>||It defines the table caption.|
|<colgroup>||It specifies a group of one or more columns in the table for formatting.|
|<col>||It is used with <colgroup> element to specify columns properties for each column.|
|<tbody>||It is used to group a body content in a table.|
|<thead>||It is used to group a header content in a table.|
|<tfooter>||It is used to group a footer content in a table.|
5. Write lists that are used when designing a page ?
Ans: There are many common lists which are used to design a page and you can choose any or a combination of the following list types:
- Ordered list:- The ordered list displays elements in numbered format. It is represented by <ol> tag.
- Unordered list:- The unordered list displays elements in bulleted format. It is represented by <ul> tag.
- Definition list:- The definition list display the elements in definition form like in dictionary. The <dl>, <dt> and <dd> tags are used for defining description list.
6. What are the difference between HTML elements and tags ?
Ans:HTML elements communicate to the browser to render text and when the elements are enclosed by brackets <>, they form HTML tags. The most of the time, tags come in a pair and surround content.
7. What are empty elements ?
Ans: HTML elements which have no content are called empty elements. For example: <br>, <hr> etc.
8. What is the use of a span tag? Give one example ?
Ans:The span tag isused for following things:-
- For adding color on the text
- For adding background for text
- Highlighting text with any color.
9. Does a hyperlink only apply to text ?
Ans: No, we can use hyperlinks on text and images both. The HTML anchor tag define the hyperlink that links one page to another page. The "href" attribute is the most important attribute of a HTML anchor tag.
10. What is a style sheet?
Ans: The style sheet is used to build a consistent, transportable, and well-designed style template. We can add these templates on several different web pages and It is also describes the look and formatting of a document written in markup language.
11. What is a marquee tag ?
Ans: Marquee is used to put a scrolling text on a web page and scrolls the image or text up, down, left or right automatically. We should put the text which you want to scroll within the <marquee>......</marquee> tag.
12. What is semantic HTML ?
Ans: Semantic HTML is a coding style. It is the use of HTML markup to reinforce the semantics or meaning of a content. For an 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.
13. What is an image map ?
Ans: Image map facilitates you to link many different web pages using a single image and it is represented by <map> tag. We can define shapes in images that you want to make part of an image mapping.
14. What is the use of alternative text in image mapping ?
Ans: When we use image maps, it can easily become confusing and difficult to determine which hotspots correspond to which links and Using alternative text lets, you put a descriptive text on each hotspot link
15. What are the limits of the text field size ?
Ans: The default size for the text field is around 13 characters. However, if we include the size attribute, we can set the size value to be as low as 1. The maximum size value will be determined by the browser width and If the size attribute is set to 0, the size will be set to the default size of 13 characters.
16. What are applets ?
Ans: The Applets are small programs that can be embedded within web pages to perform some specific functionality, such as computations, animations, and information processing and Applets are written using the Java language.
17. What happens if you open the external CSS file in a browser ?
Ans: When you try to open the external CSS file in a browser, the browser cannot open the file, because the file has a different extension and The only way to use an external CSS file is to reference it using <link/> tag within another HTML documents.
18. Tell us about two semantic tags are included in HTML5 version ?
Ans: The <article> and <section> tags are two new tags that are included in the HTML5. Articles can be composed of multiple sections that can have multiple articles and and An article tag represents a full block of content which is a section of a bigger whole.
19.What is <figure> in HTML5 ?
Ans: This tag represents a piece of self-contained flow content and it is mostly used as a single unit as a reference the main flow of the document.
20. Tell us two benefits of HTML5 Web Storage ?
Ans: Two main benefits of HTML5 Web Storage are:
- HTML5 Web Storage 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 but It helps to increase the performance of the application.
Best way of learing
Self learing is the best learing in the world. Discover yourself first then will get what you are And what you want to do .It will push you for self learing.
Why you need to learn coding?
Coding will play a vital role in one's life . It will help to open a new window of thinking . You can think better way than past . It helps to organise all the thing in better way .