HTML Interview Questions and Answers
HTML Interview Questions and Answers
Q.1.How do you add a copyright symbol on a HTML page?
Ans.Copyright symbol can be either copied and pasted from other sources. Or, you can also add it by writing a small piece of code: © or & #169; in the required page.
Q.2.What’s one main result if you do not specify a doctype in an HTML page?
Ans. New HTML5-specific tags will not be interpreted by the browser.
Q.3. What does DOCTYPE mean?
Ans. DOCTYPE or Document Type Declaration is a type of instruction which usually works in association with particular SGML or XML documents basically. Let us take an example to understand it more thoroughly, for example, A Web page with a document type definition i.e. DTD is the best to understand. In a well serialized and a proper form of the document, It manifests and also the contribution of it is a lot as a short string of markup that usually conforms to a particular syntax.
Q.4. What is HTML and what is it used for?
Ans.HTML is a widely used language that gives our webpage a structure. HTML stands for HYPERTEXT MARKUP LANGUAGE. HTML was created by Berners lee in 1991. A markup language is a set of markups tags. Every webpage is created in HTML. HTML documents are described in HTML tags.
Q.5. What is a physical tag and logical tag in HTML?
Ans. A Physical tag has physical text which is used to tell the browser how to display the text enclosed in the physical tag.Example for the physical tags are:Logical tags are used to tell the meaning of the enclosed text in it. The example of the logical tag is …. tag. When we enclose text in Important tag then it tell the browser that enclosed text is more important than other text.
Q.6. What is the purpose of using alternative texts in images?
Ans. The basic purpose of using alternative texts is to define what the image is about. During an image mapping, it can be confusing and difficult to understand what hotspots correspond to a particular link. These alternative texts come in action here and put a description at each link which makes it easy for users to understand the hotspot links easily.
Q.7.What is an image map?
Ans.Image mapping lets a user to link one image to different web pages in and out of the website. It is the process of defining special shapes inside an image and link it to different destinations.
Q.8. What is Cell Spacing and Cell Padding?
Ans.Cell Spacing is referred to space/gap between the two cells of the same table.
Cell Padding is referred to the gap/space between the content of the cell and cell wall or Cell border.
Example:
Q.9.What is grouping in HTML?Ans. Grouping is used to group several HTML controls like input, textarea, selects as well as labels (
element is used for Grouping.
Q.10. What is the XHTML?
Ans.XHTML means Extensible Hypertext Markup Language, which is basically a part of Family of XML markup language. It usually extends the most popularly used HTML i.e. Hypertext Markup Language, the pages in which the web pages are formulated.
Q.11. How to create mailto link in HTML
Ans.Basically, when we usually start with a hyperlink that is Mailto rather than using HTTP or others, the browser should be able to compose an email in the visitor’s default email program on their computer. There are two ways to insert a mailto link into a HubSpot page or email, just by inserting a hyperlink into the rich editor or inputting into the source code. Option one is basically nothing just to insert a mailto link as a hyperlink, also highlight the text or click on the image as you wish.to apply on the mailto link to for your contacts or visitors to click on and finally click Add the link to finish. Option two is to Insert a mailto link into the source code and Click Save to finish then Publish or Update your page.
Q.12.What is the difference between DIV and SPAN in HTML?
Ans.The difference between span and div is that a span element is in-line and usually used for a small chunk of HTML inside a line (such as inside a paragraph) whereas a div (division) element is block-line (which is basically equivalent to having a line-break before and after it) and used to group larger chunks of code.
This is crazy
Q.13.What is “Semantic HTML” ?
Ans. Semantic HTML or Semantic Markup is HTML that introduces meaning to the web page rather than just presentation.
,
, andare examples of Semantic Elements.Below are the list of few new Semantic Elements introducted HTML.
Q.14.What is the difference between a tag and an element in HTML?
Ans. HTML tag is just opening or closing entity.Example:
and
are called HTML tagsHTML element encompasses opening tag, closing tag, content (optional for content-less tags)Example:
This is the content
.: This complete thing is called an HTML element
Q.15.List the media types and formats supported by HTML ?
Ans. HTML supports a wide range of media formats for sound, music, videos, movies, and animations. Below is the list extensions supported by each media format.
Media Type Formats Supported
Images png, jpg, jpeg, gif, apng, svg, bmp, bmp ico, png ico
Audio MIDI, RealAudio, WMA, AAC, WAV, Ogg, MP3, MP4
Video MPEG, AVI, WMV, QuickTime, RealVideo, Flash, Ogg, WebM, MPEG-4 or MP4
Q.16.List the media types and formats supported by HTML ?
Ans. In HTML, we have two types of lists unordered lists and ordered lists. Unordered list starts with
- tag and ends with
tag. Ordered tag starts with
- and ends with
. Each list item is written as
Q.17. How are active links different from normal links?
Ans.The default color for normal and active links is blue. Some browsers recognize an active link when the mouse cursor is placed over that link; others recognize active links when the link has the focus. Those that don’t have a mouse cursor over that link is considered a normal link.
Q.18. What is
Q.1.How do you add a copyright symbol on a HTML page?
Ans.Copyright symbol can be either copied and pasted from other sources. Or, you can also add it by writing a small piece of code: © or & #169; in the required page.
Q.2.What’s one main result if you do not specify a doctype in an HTML page?
Ans. New HTML5-specific tags will not be interpreted by the browser.
Q.3. What does DOCTYPE mean?
Ans. DOCTYPE or Document Type Declaration is a type of instruction which usually works in association with particular SGML or XML documents basically. Let us take an example to understand it more thoroughly, for example, A Web page with a document type definition i.e. DTD is the best to understand. In a well serialized and a proper form of the document, It manifests and also the contribution of it is a lot as a short string of markup that usually conforms to a particular syntax.
Q.4. What is HTML and what is it used for?
Ans.HTML is a widely used language that gives our webpage a structure. HTML stands for HYPERTEXT MARKUP LANGUAGE. HTML was created by Berners lee in 1991. A markup language is a set of markups tags. Every webpage is created in HTML. HTML documents are described in HTML tags.
Q.5. What is a physical tag and logical tag in HTML?
Ans. A Physical tag has physical text which is used to tell the browser how to display the text enclosed in the physical tag.Example for the physical tags are:Logical tags are used to tell the meaning of the enclosed text in it. The example of the logical tag is …. tag. When we enclose text in Important tag then it tell the browser that enclosed text is more important than other text.
Q.6. What is the purpose of using alternative texts in images?
Ans. The basic purpose of using alternative texts is to define what the image is about. During an image mapping, it can be confusing and difficult to understand what hotspots correspond to a particular link. These alternative texts come in action here and put a description at each link which makes it easy for users to understand the hotspot links easily.
Q.7.What is an image map?
Ans.Image mapping lets a user to link one image to different web pages in and out of the website. It is the process of defining special shapes inside an image and link it to different destinations.
Q.8. What is Cell Spacing and Cell Padding?
Ans.Cell Spacing is referred to space/gap between the two cells of the same table.
Cell Padding is referred to the gap/space between the content of the cell and cell wall or Cell border.
Example:
Q.9.What is grouping in HTML?Ans. Grouping is used to group several HTML controls like input, textarea, selects as well as labels (
element is used for Grouping.
Q.10. What is the XHTML?
Ans.XHTML means Extensible Hypertext Markup Language, which is basically a part of Family of XML markup language. It usually extends the most popularly used HTML i.e. Hypertext Markup Language, the pages in which the web pages are formulated.
Q.11. How to create mailto link in HTML
Ans.Basically, when we usually start with a hyperlink that is Mailto rather than using HTTP or others, the browser should be able to compose an email in the visitor’s default email program on their computer. There are two ways to insert a mailto link into a HubSpot page or email, just by inserting a hyperlink into the rich editor or inputting into the source code. Option one is basically nothing just to insert a mailto link as a hyperlink, also highlight the text or click on the image as you wish.to apply on the mailto link to for your contacts or visitors to click on and finally click Add the link to finish. Option two is to Insert a mailto link into the source code and Click Save to finish then Publish or Update your page.
Q.12.What is the difference between DIV and SPAN in HTML?
Ans.The difference between span and div is that a span element is in-line and usually used for a small chunk of HTML inside a line (such as inside a paragraph) whereas a div (division) element is block-line (which is basically equivalent to having a line-break before and after it) and used to group larger chunks of code.
This is crazy
Q.13.What is “Semantic HTML” ?
Ans. Semantic HTML or Semantic Markup is HTML that introduces meaning to the web page rather than just presentation.
,
, andare examples of Semantic Elements.Below are the list of few new Semantic Elements introducted HTML.
Q.14.What is the difference between a tag and an element in HTML?
Ans. HTML tag is just opening or closing entity.Example:
and
are called HTML tagsHTML element encompasses opening tag, closing tag, content (optional for content-less tags)Example:
This is the content
.: This complete thing is called an HTML element
Q.15.List the media types and formats supported by HTML ?
Ans. HTML supports a wide range of media formats for sound, music, videos, movies, and animations. Below is the list extensions supported by each media format.
Media Type Formats Supported
Images png, jpg, jpeg, gif, apng, svg, bmp, bmp ico, png ico
Audio MIDI, RealAudio, WMA, AAC, WAV, Ogg, MP3, MP4
Video MPEG, AVI, WMV, QuickTime, RealVideo, Flash, Ogg, WebM, MPEG-4 or MP4
Q.16.List the media types and formats supported by HTML ?
Ans. In HTML, we have two types of lists unordered lists and ordered lists. Unordered list starts with
- tag and ends with
tag. Ordered tag starts with
- and ends with
. Each list item is written as
Q.17. How are active links different from normal links?
Ans.The default color for normal and active links is blue. Some browsers recognize an active link when the mouse cursor is placed over that link; others recognize active links when the link has the focus. Those that don’t have a mouse cursor over that link is considered a normal link.
Q.18. What is