Professional Documents
Culture Documents
HTML 50 - Q&a - 1
HTML 50 - Q&a - 1
HTML 50 - Q&a - 1
Interview
Question & Answer
Mallikarjun | @CodeBustler
HTML is very simple
and easy to learn and
In interview questions
will be very less
@CodeBustler
1. Diffn between HTML Elements & Tags
1. <header> 11.<audio>
2. <nav> 12.<canvas>
3. <section> 13.<datalist>
4. <article> 14.<output>
5. <aside> 15.<details>
6. <footer> 16.<summary>
7. <main> 17.<mark>
8. <figure>
9. <figcaption>
10. <video> @codebustler
4. What are the new form elements in
HTML5 ?
1. <input type="email">
2. <input type="url">
3. <input type="tel">
4. <input type="number">
5. <input type="range">
6. <input type="date">
7. <input type="time">
8. <input type="datetime-local">
9. <input type="month">
10. <input type="week">
11. <input type="color">
12. <input type="search">
13. <input type="file">
14. <textarea>
15. <keygen>
16. <output> @CodeBustler
5. Difference between semantic &
@CodeBustler
syntactic elements.
Class :
Used for styling & grouping elements.
Applied to one or more elements.
Defined with class attribute in HTML.
Referenced in CSS for styling rules.
Enables consistent styling across
elements.
Attributes :
Provide inform/settings to elements.
Offer instructions for behavior/display.
Elements can have multiple attributes.
Examples: src, alt, href, class.
Enhance functionality and
appearance.
@CodeBustler
8. How is DOM rendered by Browser ?
@CodeBustler
11. What is responsive web design
@CodeBustler
15. What is the use of META tags ?
character encoding
viewport settings
page description
author, and more. @CodeBustler
Example
16. Diffn between attribute & property
Example
How iframe works
@CodeBustler
iframe common use cases
@CodeBustler
21. Diffrn between progress & meter tag
<progress> : Shows task completion
progress, often for uploads, with
dynamic updates using JS. Uses
attributes like value and max for the
current and maximum values. Displays
as a filling horizontal bar.
@CodeBustler
Video Formats:
1. MP4 (H.264)
2. WebM (VP8/VP9)
3. Ogg (Theora)
Audio Formats:
1. MP3
2. AAC
3. Ogg (Vorbis)
@CodeBustler
23. What is <datalist> tag | example
<details> Element :
Acts as a container to toggle content.
Creates an expandable/collapsible
widget.
Content inside <details> starts hidden.
<summary> Element :
Offers a visible label/heading for
widget.
When collapsed, only <summary>
content shows.
@CodeBustler
25. Explain about <a> anchor tag &
target attribute
Creates clickable links to other content.
Uses the href attribute to specify the link's
destination
target Attribute:
Used within <a> to how displayed.
_blank: Opens in a new window/tab.
_self: same window/tab (default).
_parent: parent frame (iframes).
_top: full window (breaks frames).
@CodeBustler
26. Explain in detail about lists in HTML
@CodeBustler
content in multiple languages ?
default language
of the entire page
28. What are data- attributes ?
@CodeBustler
29. Why is it generally a good idea to
position CSS <link>s between <head>
</head> and <script>s just before
</body>?
@CodeBustler
Advantages :
@CodeBustler
30. What is progressive rendering?
@CodeBustler
31. Why would you use a srcset
attribute in an image tag? @CodeBustler
Explain the process the browser uses
when evaluating the content of this
attribute
@CodeBustler
33. HTML Vs XHTML Vs XML @CodeBustler
33. What are the various formatting tags
Formatting tags in HTML are used to
apply visual styling and structure to text
content within a web page.
@CodeBustler
34. Significance of <head> & <body> tags
<head> Tag :
The <head> tag holds non-displayed
metadata like title, encoding, styles, and
scripts. It guides search engines and
browsers on how to handle and present
the page. (SEO)
<body> Tag :
The <body> tag surrounds visible content
users interact with, like headings,
images, and links. It defines the main
content, appearance, and interactivity
of the webpage.
@CodeBustler
35. Explain Inline & block elements
Inline Elements : @CodeBustler
Flow within text or content.
Take up only as much width as needed.
Examples:
<span>, <a>, <strong>, <em>, <img>.
Block Elements :
Create new blocks &start on new lines.
Occupy full available width by default.
Examples:
<div>, <p>, <h1>, <ul>, <li>.
@CodeBustler
2. Use an <iframe> tag with map's URL:
1. Locate the Map on Google Maps:
Go to Google Maps.
Find the location you want to embed
on the map.
2. Get the Embed Code:
Click on the "Share" button
Choose the "Embed a map" tab.
Customize the map's size if needed.
Copy the generated <iframe> code.
3. Paste the <iframe> Code:
In your HTML file, paste the <iframe>
code where you want the map to
appear.
@CodeBustler
Google Map Embed Example :
@CodeBustler
39. What is HTML5? What are its new
features that were not present in HTML?
@CodeBustler
40. Explain the layout of HTML.
1. <!DOCTYPE> : Specifies HTML version.
2. <html> : Root element.
3. <head> : Contains metadata (title, links,
scripts).
4. <body> : Displays visible content
(text, images, interactive elements).
Headings (<h1> to <h6>) & para <p>.
Images (<img>).
Hyperlinks (<a>).
Lists (<ul> and <ol>).
Tables (<table>).
Forms (<form> and input fields).
Interactive elements (buttons,
multimedia).
Layout divisions (<div>, semantic
elements like <header>, <main>,
<footer>). @CodeBustler
40. Explain an image map in HTML
An image map in HTML allows you to create
clickable areas within an image. Here's how
it works:
@CodeBustler
@CodeBustler
46. Which tags are no longer valid in
HTML5?
<acronym>, <big>, <center>, <applet>,
<frame>, <basefont>, <font>, <dir>,
<isindex>, <frameset>, <noframes>, <tt>,
<u>, <strike>, <s>
@CodeBustler
48. Which tag represents an
independent piece of content of a
document in HTML5?
The <article> tag in HTML5 represents
standalone content like blog posts,
forum entries, or news stories, meant to
be distributed independently from the
rest of the site.
@CodeBustler
50. Do all HTML tags come in a pair?
No, there are single HTML tags that do
not need a closing tag. Examples are
the <img> tag and <br> tags.
@CodeBustler
@CodeBustler
Mallikarjun | Web Developer