100 Most Asked HTML QnA
100 Most Asked HTML QnA
QnA
Made By:
The <pre> tag is used to display preformatted text, preserving both spaces and line breaks
as they appear in the HTML code.
The disabled attribute is used to make a form input field or button non-editable or non-
clickable. It prevents user interaction with the element.
The readonly attribute is used to make a form input field non-editable. It allows the user to
view the value but not modify it.
The <progress> tag is used to represent the progress of a task or the completion of a
process, such as a file upload or a download.
What is the purpose of the placeholder attribute in form elements?
The placeholder attribute is used to provide a hint or example value for a form input field.
It is displayed in the field until the user enters their own value.
The <ruby> tag is used to annotate or provide pronunciation guidance for characters in
East Asian typography. The <rt> tag is used to define the pronunciation of the characters.
The <bdi> tag is used to isolate a section of text that is to be formatted in a different
direction from its surrounding text. It is often used for multilingual content.
The <details> tag is used to create a collapsible section that can be toggled open or
closed. The <summary> tag is used to provide a summary or heading for the collapsible
section.
The <wbr> tag is used to suggest a line break opportunity within a word. It is used to
control word wrapping in long URLs or strings without adding unnecessary spaces.
The contenteditable attribute is used to make an element editable by the user. It allows
the user to modify the content directly in the browser.
The spellcheck attribute is used to enable or disable spell checking for a form input field.
The <cite> tag is used to mark a reference to a creative work, such as a book, article, or
movie title.
The download attribute is used to specify that a hyperlink should be downloaded instead
of navigated to when clicked. It specifies the filename of the downloaded file.
What is the purpose of the <script> tag in HTML?
The <script> tag is used to embed or reference JavaScript code within an HTML document.
Inline JavaScript is directly embedded within the HTML document using the <script> tag,
while external JavaScript is saved in a separate .js file and linked to the HTML document
using the src attribute of the <script> tag.
The <noscript> tag is used to provide an alternative content that should be displayed if a
web browser does not support or has disabled JavaScript.
The defer attribute is used to indicate that the script should be executed after the
document has been parsed, allowing it to not block rendering.
The async attribute is used to indicate that the script can be executed asynchronously,
without blocking the rendering of the page.
The <iframe> tag is used to embed another web page or document within the current
HTML document.
The sandbox attribute is used to restrict the capabilities of the content within the <iframe>,
providing a secure and isolated environment.
The <datalist> tag is used to provide a list of predefined options for an <input> field. It
provides suggestions as the user types.
The autocomplete attribute is used to control whether a form input field should have
autocomplete suggestions or not.
What is the purpose of the <figure> and <figcaption> tags in HTML?
The <meter> tag is used to represent a scalar measurement within a known range, such
as a progress bar, disk usage, or temperature.
The <time> tag is used to represent a specific time or date. It can be used for machine-
readable dates, event schedules, or time-related content.
The required attribute is used to specify that a form input field must be filled out before
submitting the form.
The autocomplete attribute is used to control whether a form input field should have
autocomplete suggestions or not.
The <nav> tag is used to define a section of a web page that contains navigation links.
The <abbr> tag is used to define an abbreviation or acronym. It can provide additional
information when the user hovers over it.
The <pre> tag is used to display preformatted text, preserving both spaces and line breaks
as they appear in the HTML code.
The disabled attribute is used to make a form input field or button non-editable or non-
clickable. It prevents user interaction with the element.
What is the purpose of the readonly attribute in formelements?
The readonly attribute is used to make a form input field non-editable. It allows the user to
view the value but not modify it.
The <progress> tag is used to represent the progress of a task or the completion of a
process, such as a file upload or a download.
The placeholder attribute is used to provide a hint or example value for a form input field.
It is displayed in the field until the user enters their own value.
The <ruby> tag is used to annotate or provide pronunciation guidance for characters in
East Asian typography. The <rt> tag is used to define the pronunciation of the characters.
The <bdi> tag is used to isolate a section of text that is to be formatted in a different
direction from its surrounding text. It is often used for multilingual content.
The <details> tag is used to create a collapsible section that can be toggled open or
closed. The <summary> tag is used to provide a summary or heading for the collapsible
section.
- The <wbr> tag is used to suggest a line break opportunity within a word. It is used to
control word wrapping in long URLs or strings without adding unnecessary spaces.