HTML VIVA Questions
HTML VIVA Questions
1. What is HTML?
o HTML (HyperText Markup Language) is the standard markup
language for creating web pages.
2. What is the latest version of HTML?
o HTML5.
3. What are some key features of HTML5?
o Semantics, Connectivity, Offline storage, Multimedia support,
2D/3D graphics, Device access, Styling, and Performance
improvements.
4. What are semantic elements in HTML5?
o Elements that clearly describe their meaning (e.g., <article>,
<section>, <header>, <footer>).
5. How does HTML5 improve multimedia support?
o By introducing <audio> and <video> tags for embedding
media without plugins.
HTML Elements
6. What are block-level elements?
o Elements that start on a new line and take up the full width,
such as <div>, <p>, <h1>.
7. What are inline elements?
o Elements that do not start on a new line, such as <span>,
<a>, <img>.
8. What is the purpose of the <blockquote> element?
o To define a section quoted from another source.
9. What is the difference between <h1> to <h6>?
o They represent headings, with <h1> being the most
important and <h6> the least.
10.What is the <meta> tag used for?
o Provides metadata about the HTML document, such as
description, keywords, or charset.
HTML5 Attributes
11.What is the purpose of the id attribute?
o Provides a unique identifier for an HTML element.
12.How is the class attribute used?
o It groups multiple elements for styling or scripting.
13.What is the title attribute?
o Provides additional information about an element, displayed
as a tooltip.
14.What is the difference between name and id attributes?
o id is unique, while name can be shared among multiple
elements.
15.What does the download attribute do in an <a> tag?
o Specifies that the linked file should be downloaded when
clicked.
HTML Forms
16.What are form attributes in HTML?
o action, method, enctype, and target.
17.What is the difference between get and post methods in
forms?
o GET: Appends data to the URL, suitable for retrieval.
POST: Sends data as a request body, suitable for secure data
submission.
18.What does the <input type="hidden"> element do?
o Stores data that is not visible to users but is sent with the
form.
19.What is the <fieldset> element used for?
o Groups related elements in a form.
20.What is the purpose of the <button> element?
o Creates clickable buttons with types like submit, reset, or
button.
Hyperlinks
21.What is the difference between mailto: and tel: in
hyperlinks?
o mailto: opens an email client, while tel: initiates a phone call.
22.What does the target="_blank" attribute do?
o Opens the link in a new tab or window.
23.How can you create an anchor link in HTML?
o Use <a href="#id"> to link to an element with the
corresponding id.