Top 10 HTML Interview Questions

Page 1

Top 10 HTML Interview Questions ● ● ● ● ● ●

Why is the “alt” in <img> tag is used in HTML? What are the entities in HTML? What is SVG? what are the frequently new elements using in HTML 5? what is the use of a datalist tag? How to add external script and external style into an HTML page?


Are you preparing for HTML and don’t know where to start? Well, then you are in the right place! In this blog, we have prepared a list of HTML Interview Questions that are most likely to be asked by the interviewers. This helps the students prepare thoroughly for the technical interview.In this slide ,i like to share my personal experience on dealing with technical interview on HTML


1. Why is the “alt” in <img> tag is used in HTML?

Alt specifies as an alternate text for an image. ○ ○ ○

alt=" " is used if the image is only for decoration The text should explain where the link goes only if the image is inside an <a> element. The text in alt is used to describe the image if the image s containing information.


2. How to Add copyright symbol in HTML? The copyright symbol is the identification of the owner of the copyright, either by name, abbreviation, or other designation, you can use it by the following ways in any HTML page:&copy

or

&#169

3. 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.


4. What are the entities in HTML? The HTML character entities are used as a replacement for reserved characters in HTML. You can also replace characters that are not present on your keyboard by entities. These characters are replaced because some characters are reserved in HTML. 5. What is SVG? In HTML,SVG is used to describe the 2-D vector and vector/raster graphics. SVG images and their behaviors are defined in XML text files. So as XML files, you can create and edit an SVG image with the text editor. It is mostly used for vector type diagrams like pie charts, 2-Dimensional graphs in an X, Y coordinate system. <svg width="100" height="100"> <circle cx="50" cy="50" r="40" stroke="yellow" stroke-width="4" fill="red" /> </svg>


6.

what are the frequently new elements using in HTML 5? There are few new elements using in HTML 5:❏ ❏ ❏ ❏ ❏ ❏ ❏ ❏ ❏ ❏

Color Date Datetime-local Email Time Url Range Telephone Number Search


7.

Name the supported file formats for <audio> tag in HTML 5 ? 8. mp3 9. WAV 10. Ogg For example:<audio controls> <source src="koyal.mp3" type="audio/mpeg"> Your browser does not support the HTML <audio> tag. </audio>


8 . what is the use of a datalist tag? Datalist tag provides an autocomplete feature on the form element. It facilitates users to choose the predefined options for the users to select data. 9. How to add external script and external style into an HTML page? 1. 2.

External style External script

: :

<link rel="stylesheet" href="style.css"> <script src="./js/main.js"></script>

10. Which Tag is mainly used to display if scripts are not supported by the browser? The <nonscript> tag is mainly used to display if scripts are not supported by the browser <Nonscript> tag shows an alternate content for users who have disabled scripts in their browser or have a browser that is not supporting script. The <noscript> element can be used in both <head> and <body>.


Thank You


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.