SlideShare a Scribd company logo
www.edureka.co/masters-program/machine-learning-engineer-training
HTML
Interview Questions
HTML
Interview Questions
What is HTML?
Question 1
HTML stands for Hyper Text Markup Language.
It is a language of the World Wide Web. It is a
standard text formatting language which is used
to create and display pages on the Web. HTML
makes the text more interactive and dynamic.
HTML
Interview Questions
What is the difference
between HTML Elements
and Tags?
Question 2
Elements Tags
The element is an individual
component of the HTML web page or
document. It represents semantics
or meaning. For example, the title
element represents the title of the
document.
It is the root of the HTML document
which is used to specify that the
document is HTML. For example, the
Head tag is used to contain all the
head element in the HTML file.
HTML
Interview Questions
What are attributes and
how do you use them?
Question 3 Attributes are specified directly after the name of the tag, inside
the two angled brackets. They should only ever appear in opening
tags or in self-closing tags. But they can never be in closing tags.
Example
HTML
Interview Questions
What is the difference
between block-level &
inline element?
Question 4
Block Inline
A block-level element is drawn as a
block that stretches to fill the full
width available to it .
Elements that are block-level by
default: <div>, <img>, <section>,
<form>, <nav>.
Inline elements are drawn where they
are defined and only take up space
that is absolutely needed.
Examples of elements that are inline
by default: <span>, <b>, <strong>,
<a>, <input>.
HTML
Interview Questions
When are Comments used
in HTML?
Question 5 To understand the code easily, you can add code comments to your
HTML document. These are not displayed in the browser, but they
help you in leaving notes for yourself and other developers as to
what a section of HTML is for.
Example
HTML
Interview Questions
What are the HTML Tags
used to display data in
tabular form?
Question 6
HTML
Interview Questions
How to create a Hyperlink
in HTML?
Question 7
The HTML provides an anchor tag to create a hyperlink that links one page to
another page. These tags can appear as:
Unvisited Link
Active Link
Visited Link
Syntax
HTML
Interview Questions
Name some common lists
that are used when
designing a page.
Question 8 There are many common lists used for design a page. You can choose any or a
combination of the following list types:
Ordered List
Unordered List
Definition List
HTML
Interview Questions
What is semantic in
HTML?
Question 9
Semantic HTML is a coding style. It is the
use of HTML markup to reinforce the
semantics or meaning of the content. For
example: In semantic HTML <b> </b> tag
is not used for bold statement as well
as <i> </i> tag is used for italic. Instead
of these we
use <strong></strong> and <em></em>
tags.
HTML
Interview Questions
How to create a nested
webpage in HTML?
Question 10 The HTML iframe tag is used to display a nested webpage. In other
words, it represents a webpage within a webpage. The HTML
<iframe> tag defines an inline frame.
Example
HTML
Interview Questions
What is an image map?
Question 11
An image map is used for linking many
different web pages using a single image. It
is represented by <map> tag. You can
define shapes in images that you want to
include as part of an image mapping.
HTML
Interview Questions
Does a hyperlink only
apply to text?
Question 12
No, hyperlinks can be used both on texts and images. The HTML
anchor tag defines a hyperlink that links one page to another page.
The “href” attribute is the most important attribute of the HTML
anchor tag.
Syntax
HTML
Interview Questions
What is a Style Sheet?
Question 13
A style sheet is used to build a consistent,
transportable, and well-designed style
template. You can add these templates on
several different web pages. It describes
the look and formatting of a document
written in the markup language.
Style
Sheet
HTML
Interview Questions
Explain the layout of
HTML?
Question 14
HTML
Interview Questions
Explain the layout of
HTML?
Question 14
Header
Section
Nav
Article
Aside
Footer
Question 15
What is a marquee?
HTML
Interview Questions
Marquee is used for the scrolling text on a web page. It scrolls the image
or text up, down, left or right automatically. You should put the text which
you want to scroll within the <marquee>……</marquee> tag.
Question 16
What are the tags used to
separate a section of
texts?
HTML
Interview Questions
It is used to separate the line of
text. It breaks the current line and
conveys the flow to the next line
<br>
<blockquote>
It is used to define a large quoted section. If
you have a large quotation, then put the entire
text
within <blockquote>……….</blockquote> tag
This contains the text in the form of a
new paragraph.
<p>
Question 17
What is the difference
between DIV and SPAN in
HTML?
HTML
Interview Questions
Example
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 or division element is block-line which is
equivalent to having a line-break before and after it and used to group
larger chunks of code.
Question 18
What is the purpose of
using alternative texts in
images?
HTML
Interview Questions
The 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.
Question 19
How to create a new HTML
element?
HTML
Interview Questions
You can create new elements for the document in the following way:
It can be also be used in the HTML as:
Question 20
Is the <!DOCTYPE html> tag
considered as a HTML
tag?
HTML
Interview Questions
No, the <!DOCTYPE html> declaration is not an HTML
tag.
There are many type of HTML, such as, HTML 4.01
Strict, HTML 4.01 Transitional, HTML 4.01 Frameset,
XHTML 1.0 Strict, XHTML 1.0 Transitional, XHTML 1.0
Frameset, XHTML 1.1 etc. So, <!DOCTYPE html> is used
to instruct the web browser about the HTML page.
<!DOCTYPE>
Question 21
Why is a URL encoded in
HTML?
HTML
Interview Questions
An URL is encoded to convert non-ASCII
characters into a format that can be used over
the Internet because a URL is sent over the
Internet by using the ASCII character-set only. If
a URL contains characters outside the ASCII set,
the URL has to be converted. The non-ASCII
characters are replaced with a “%” followed by
hexadecimal digits.
URL
Question 22
What is the use of an
iframe tag?
HTML
Interview Questions
An iframe is used to display a web page within a web page.
Synatx
Example
Target to Link
Question 23
What are the entities in
HTML?
HTML
Interview Questions
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.
Question 24
Can you create a multi-
colored text on a web
page?
HTML
Interview Questions
Yes, we can create a multi-colored text on a web page. To create a
multicolor text, you can use <font color =”color”> </font> for the
specific texts that you want to color.
Question 25
How to make a picture of
a background image of a
web page?
HTML
Interview Questions
To make a picture a background image on a web page, you should
put the following tag code after the </head> tag.
Example
Question 26
What is the use of a span
tag? Explain with
example.
HTML
Interview Questions
The span tag is used for following things:
For adding colors on text
To add background on text
Highlight any color text
Example
Question 27
What is the advantage of
collapsing white space?
HTML
Interview Questions
White spaces are a blank sequence of space
characters, which is treated as a single space
character in HTML. Because the browser
collapses multiple spaces into a single space, you
can indent lines of text without worrying about
multiple spaces. This enables you to organize the
HTML code into a much more readable format.
White
space
Question 28
Is there any way to keep
list elements straight in an
HTML file?
HTML
Interview Questions
By using indents, you can keep the list elements straight. If you indent
each sub nested list in further than the parent list, you can easily
determine the various lists and the elements that it contains.
Question 29
Explain The Key
Differences Between
LocalStorage And
SessionStorage Objects.
HTML
Interview Questions
The localStorage object stores the data without an expiry date.
However, sessionStorage object stores the data for only one
session.
In the case of a localStorage object, data will not delete when the browser
window closes. However, the data gets deleted if the browser window closes, in
the case of sessionStorage objects.
The data in sessionStorage is accessible only in the current window
of the browser. But, the data in the localStorage can be shared
between multiple windows of the browser.
Question 30
When is it appropriate to
use frames?
HTML
Interview Questions
Frames can make navigating a site much easier. If the main
links to the site are located in a frame that appears at the
top or along the edge of the browser, the content for those
links can be displayed in the remainder of the browser
window.
Question 31
How to insert a into a
background image of a
web page?
HTML
Interview Questions
To insert a background image on a web page, you should put the
following tag code after the </head> tag.
Example
Question 32
What happens if you open
the external CSS file in a
browser?
HTML
Interview Questions
When you try to open the external CSS file in a
browser, the browser cannot open the file,
because the file has a different extension. The
only way to use an external CSS file is to
reference it using <link/> tag within another
HTML document.
If a single selector includes three different style definitions, the
definition that is closest to the actual tag takes precedence. Inline
style takes priority over embedded style sheets, which takes
priority over external style sheets.
Question 33
What is the hierarchy that
is being followed when it
comes to style sheets?
HTML
Interview Questions
Question 34
How do you create text on
a webpage that allows
you to send an email
when clicked?
HTML
Interview Questions
To change the text into a clickable link to send an email, you need to
use the mailto command within the href tag. You can write it in the
following way:
Example
Question 35
How are active links
different from normal
links?
HTML
Interview Questions
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.
Whereas, 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.
Links
Question 36
What are the different
tags to separate sections
of text?
HTML
Interview Questions
The <br> tag is one way to separate the
lines of text. There are other tags like
the <p> tag and <blockquote> tag that
are also used to separate sections of
text.
Tags
Question 37
Are there instances
where the text will
appear outside of the
browser?
HTML
Interview Questions
By default, the text is wrapped to appear within the browser
window. However, if the text is part of a table cell with a
defined width, the text could extend beyond the browser
window.
Question 38
Write an HTML table tag
sequence that outputs the
following:
50 pcs 100 500
10 pcs 5 50
HTML
Interview Questions
The HTML Code for the problem is:
Example
Question 39
What is the advantage of
grouping several
checkboxes together?
HTML
Interview Questions
By default, the text is wrapped to appear within the browser
window. However, if the text is part of a table cell with a
defined width, the text could extend beyond the browser
window.
Question 40
What happens if there is
no text between the tags?
Does this affect the
display of the HTML file?
HTML
Interview Questions
If there is no text present between the
tags, there is nothing to format. Therefore,
no formatting will appear. Some tags, such
as the tags without a closing tag like
the <img> tag, do not require any text
between them.
Question 41
What are the limits of the
text field size?
HTML
Interview Questions
The default size for a text field is around 13 characters. However, if you
include the size attribute, you can set the size value to be as low as 1. The
maximum size value will be determined by the browser width. Also, if the
size attribute is set to 0, the size will be set to the default size of 13
characters.
Question 42
What is the relationship
between the border and
rule attributes?
HTML
Interview Questions
Default cell borders, with a thickness of 1 pixel,
are automatically added between cells if the
border attribute is set to a nonzero value.
Similarly, If the border attribute is not included,
a default 1-pixel border appears when the rules
attribute is added to the <table> tag.
Border
&
Rule
Question 43
What is SVG?
HTML
Interview Questions
HTML SVG is used to describe the two-dimensional vector and vector or
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.
Question 44
What is Button Tag?
HTML
Interview Questions
The button tag is used in HTML 5. It is used to create a clickable button
within the HTML form on the web page. This tag creates a “submit” or
“reset” button. The button tag code is as follows:
Question 45
List the media types and
formats supported by
HTML.
HTML
Interview Questions
png, jpg, jpeg, gif, apng, svg, bmp,
BMP ico, png icoImages
Video
MPEG, AVI, WMV, QuickTime, RealVideo,
Flash, Ogg, WebM, MPEG-4 or MP4
MIDI, RealAudio, WMA, AAC, WAV,
Ogg, MP3, MP4
Audio
Question 46
What is Cell Spacing and
Cell Padding?
HTML
Interview Questions
Cell Spacing is referred to as the space or gap between the two cells of
the same table. Whereas, Cell Padding is referred to as the gap or space
between the content of the cell and cell wall or cell border.
Question 47
What is difference
between HTML and
XHTML?
HTML
Interview Questions HTML is an application of Standard Generalized Markup
Language. Whereas, XML is an application of Extensible Markup
Language.
The first one is a static Web Page whereas the later one is a dynamic
Web Page.
HTML allows programmer to perform changes in the tags and use
attribute minimization whereas XHTML when user need a new
markup tag then user can define it in this.
HTML is about displaying information whereas XHTML is about
describing the information.
Question 48
How many types of CSS
can be included in HTML?
HTML
Interview Questions
There are three ways to include the CSS with HTML:
Inline CSS
External Stylesheet
Internal Stylesheet
Question 49
What are logical and
physical tags in HTML?
HTML
Interview Questions
Physical tags are used to tell the browser
how to display the text enclosed in the
physical tag. Some of the examples of
physical tags are <b>, <big>, <i>.
Physical
Tags
Logical tags are used to tell the meaning
of the enclosed text. The example of the
logical tag is <strong> </strong> tag.
When we enclose the text in the strong tag,
it tells the browser that enclosed text is
more important than other texts.
Logical
Tags
Question 50
How can you apply
JavaScript to a web
page?
HTML
Interview Questions Inline
Script Block
Link to JavaScript file
MySQL DBA Certification Training www.edureka.co/mysql-dba
Top 50 HTML Interview Questions and Answers | Edureka

More Related Content

ODP
Introduction of Html/css/js
PPT
JavaScript Tutorial
PPTX
Introducing CSS Grid
PDF
Introduction to html
PPT
Css Ppt
PPTX
HTML: Tables and Forms
PDF
3.2 javascript regex
PPTX
Bootstrap ppt
Introduction of Html/css/js
JavaScript Tutorial
Introducing CSS Grid
Introduction to html
Css Ppt
HTML: Tables and Forms
3.2 javascript regex
Bootstrap ppt

What's hot (20)

PPTX
HTML/HTML5
PPTX
Html
PDF
Html for beginners
PPTX
PPTX
Html ppt
PPTX
Html5 tutorial for beginners
PPTX
Introduction to CSS
PPTX
Bootstrap PPT Part - 2
PPTX
Css Complete Notes
PDF
CSS Grid
PDF
Html,javascript & css
PPTX
Forms in html5
PPTX
An Overview of HTML, CSS & Java Script
PPTX
Css animation
PPT
Intro Html
KEY
HTML presentation for beginners
PPT
Java Script ppt
ODP
Projects In Laravel : Learn Laravel Building 10 Projects
PPTX
Html
HTML/HTML5
Html
Html for beginners
Html ppt
Html5 tutorial for beginners
Introduction to CSS
Bootstrap PPT Part - 2
Css Complete Notes
CSS Grid
Html,javascript & css
Forms in html5
An Overview of HTML, CSS & Java Script
Css animation
Intro Html
HTML presentation for beginners
Java Script ppt
Projects In Laravel : Learn Laravel Building 10 Projects
Html
Ad

Similar to Top 50 HTML Interview Questions and Answers | Edureka (20)

PDF
HTML Interview Questions PDF By ScholarHat
PDF
Interview+Questions (1).pdf
PPTX
Html Concept
PDF
Html interview-questions-and-answers
DOCX
PPTX
Html starting
PDF
Crash Course Web - HTML Presentation
PPTX
Grade 10 COMPUTER
PPTX
Xhtml and html5 basics
PDF
WEB PROGRAMMING bharathiar university bca unitII
PPTX
Html 5
DOCX
Learn HTML and know that you don.docx
PPTX
Ifi7174 lesson1
KEY
Class1slides
PPTX
HTML
PPTX
Basic HTML
PPT
Web forms and html (lect 1)
PDF
Chapter 2 Notes, MCQs, and QA (HTML and CSS).pdf
HTML Interview Questions PDF By ScholarHat
Interview+Questions (1).pdf
Html Concept
Html interview-questions-and-answers
Html starting
Crash Course Web - HTML Presentation
Grade 10 COMPUTER
Xhtml and html5 basics
WEB PROGRAMMING bharathiar university bca unitII
Html 5
Learn HTML and know that you don.docx
Ifi7174 lesson1
Class1slides
HTML
Basic HTML
Web forms and html (lect 1)
Chapter 2 Notes, MCQs, and QA (HTML and CSS).pdf
Ad

More from Edureka! (20)

PDF
What to learn during the 21 days Lockdown | Edureka
PDF
Top 10 Dying Programming Languages in 2020 | Edureka
PDF
Top 5 Trending Business Intelligence Tools | Edureka
PDF
Tableau Tutorial for Data Science | Edureka
PDF
Python Programming Tutorial | Edureka
PDF
Top 5 PMP Certifications | Edureka
PDF
Top Maven Interview Questions in 2020 | Edureka
PDF
Linux Mint Tutorial | Edureka
PDF
How to Deploy Java Web App in AWS| Edureka
PDF
Importance of Digital Marketing | Edureka
PDF
RPA in 2020 | Edureka
PDF
Email Notifications in Jenkins | Edureka
PDF
EA Algorithm in Machine Learning | Edureka
PDF
Cognitive AI Tutorial | Edureka
PDF
AWS Cloud Practitioner Tutorial | Edureka
PDF
Blue Prism Top Interview Questions | Edureka
PDF
Big Data on AWS Tutorial | Edureka
PDF
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
PDF
Kubernetes Installation on Ubuntu | Edureka
PDF
Introduction to DevOps | Edureka
What to learn during the 21 days Lockdown | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
Tableau Tutorial for Data Science | Edureka
Python Programming Tutorial | Edureka
Top 5 PMP Certifications | Edureka
Top Maven Interview Questions in 2020 | Edureka
Linux Mint Tutorial | Edureka
How to Deploy Java Web App in AWS| Edureka
Importance of Digital Marketing | Edureka
RPA in 2020 | Edureka
Email Notifications in Jenkins | Edureka
EA Algorithm in Machine Learning | Edureka
Cognitive AI Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
Blue Prism Top Interview Questions | Edureka
Big Data on AWS Tutorial | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Kubernetes Installation on Ubuntu | Edureka
Introduction to DevOps | Edureka

Recently uploaded (20)

PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
 
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Empathic Computing: Creating Shared Understanding
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPT
Teaching material agriculture food technology
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Per capita expenditure prediction using model stacking based on satellite ima...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Big Data Technologies - Introduction.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
MIND Revenue Release Quarter 2 2025 Press Release
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Spectral efficient network and resource selection model in 5G networks
Review of recent advances in non-invasive hemoglobin estimation
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
 
sap open course for s4hana steps from ECC to s4
Empathic Computing: Creating Shared Understanding
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Teaching material agriculture food technology
Programs and apps: productivity, graphics, security and other tools
Understanding_Digital_Forensics_Presentation.pptx
Unlocking AI with Model Context Protocol (MCP)

Top 50 HTML Interview Questions and Answers | Edureka

  • 2. HTML Interview Questions What is HTML? Question 1 HTML stands for Hyper Text Markup Language. It is a language of the World Wide Web. It is a standard text formatting language which is used to create and display pages on the Web. HTML makes the text more interactive and dynamic.
  • 3. HTML Interview Questions What is the difference between HTML Elements and Tags? Question 2 Elements Tags The element is an individual component of the HTML web page or document. It represents semantics or meaning. For example, the title element represents the title of the document. It is the root of the HTML document which is used to specify that the document is HTML. For example, the Head tag is used to contain all the head element in the HTML file.
  • 4. HTML Interview Questions What are attributes and how do you use them? Question 3 Attributes are specified directly after the name of the tag, inside the two angled brackets. They should only ever appear in opening tags or in self-closing tags. But they can never be in closing tags. Example
  • 5. HTML Interview Questions What is the difference between block-level & inline element? Question 4 Block Inline A block-level element is drawn as a block that stretches to fill the full width available to it . Elements that are block-level by default: <div>, <img>, <section>, <form>, <nav>. Inline elements are drawn where they are defined and only take up space that is absolutely needed. Examples of elements that are inline by default: <span>, <b>, <strong>, <a>, <input>.
  • 6. HTML Interview Questions When are Comments used in HTML? Question 5 To understand the code easily, you can add code comments to your HTML document. These are not displayed in the browser, but they help you in leaving notes for yourself and other developers as to what a section of HTML is for. Example
  • 7. HTML Interview Questions What are the HTML Tags used to display data in tabular form? Question 6
  • 8. HTML Interview Questions How to create a Hyperlink in HTML? Question 7 The HTML provides an anchor tag to create a hyperlink that links one page to another page. These tags can appear as: Unvisited Link Active Link Visited Link Syntax
  • 9. HTML Interview Questions Name some common lists that are used when designing a page. Question 8 There are many common lists used for design a page. You can choose any or a combination of the following list types: Ordered List Unordered List Definition List
  • 10. HTML Interview Questions What is semantic in HTML? Question 9 Semantic HTML is a coding style. It is the use of HTML markup to reinforce the semantics or meaning of the content. For example: In semantic HTML <b> </b> tag is not used for bold statement as well as <i> </i> tag is used for italic. Instead of these we use <strong></strong> and <em></em> tags.
  • 11. HTML Interview Questions How to create a nested webpage in HTML? Question 10 The HTML iframe tag is used to display a nested webpage. In other words, it represents a webpage within a webpage. The HTML <iframe> tag defines an inline frame. Example
  • 12. HTML Interview Questions What is an image map? Question 11 An image map is used for linking many different web pages using a single image. It is represented by <map> tag. You can define shapes in images that you want to include as part of an image mapping.
  • 13. HTML Interview Questions Does a hyperlink only apply to text? Question 12 No, hyperlinks can be used both on texts and images. The HTML anchor tag defines a hyperlink that links one page to another page. The “href” attribute is the most important attribute of the HTML anchor tag. Syntax
  • 14. HTML Interview Questions What is a Style Sheet? Question 13 A style sheet is used to build a consistent, transportable, and well-designed style template. You can add these templates on several different web pages. It describes the look and formatting of a document written in the markup language. Style Sheet
  • 15. HTML Interview Questions Explain the layout of HTML? Question 14
  • 16. HTML Interview Questions Explain the layout of HTML? Question 14 Header Section Nav Article Aside Footer
  • 17. Question 15 What is a marquee? HTML Interview Questions Marquee is used for the scrolling text on a web page. It scrolls the image or text up, down, left or right automatically. You should put the text which you want to scroll within the <marquee>……</marquee> tag.
  • 18. Question 16 What are the tags used to separate a section of texts? HTML Interview Questions It is used to separate the line of text. It breaks the current line and conveys the flow to the next line <br> <blockquote> It is used to define a large quoted section. If you have a large quotation, then put the entire text within <blockquote>……….</blockquote> tag This contains the text in the form of a new paragraph. <p>
  • 19. Question 17 What is the difference between DIV and SPAN in HTML? HTML Interview Questions Example 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 or division element is block-line which is equivalent to having a line-break before and after it and used to group larger chunks of code.
  • 20. Question 18 What is the purpose of using alternative texts in images? HTML Interview Questions The 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.
  • 21. Question 19 How to create a new HTML element? HTML Interview Questions You can create new elements for the document in the following way: It can be also be used in the HTML as:
  • 22. Question 20 Is the <!DOCTYPE html> tag considered as a HTML tag? HTML Interview Questions No, the <!DOCTYPE html> declaration is not an HTML tag. There are many type of HTML, such as, HTML 4.01 Strict, HTML 4.01 Transitional, HTML 4.01 Frameset, XHTML 1.0 Strict, XHTML 1.0 Transitional, XHTML 1.0 Frameset, XHTML 1.1 etc. So, <!DOCTYPE html> is used to instruct the web browser about the HTML page. <!DOCTYPE>
  • 23. Question 21 Why is a URL encoded in HTML? HTML Interview Questions An URL is encoded to convert non-ASCII characters into a format that can be used over the Internet because a URL is sent over the Internet by using the ASCII character-set only. If a URL contains characters outside the ASCII set, the URL has to be converted. The non-ASCII characters are replaced with a “%” followed by hexadecimal digits. URL
  • 24. Question 22 What is the use of an iframe tag? HTML Interview Questions An iframe is used to display a web page within a web page. Synatx Example Target to Link
  • 25. Question 23 What are the entities in HTML? HTML Interview Questions 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.
  • 26. Question 24 Can you create a multi- colored text on a web page? HTML Interview Questions Yes, we can create a multi-colored text on a web page. To create a multicolor text, you can use <font color =”color”> </font> for the specific texts that you want to color.
  • 27. Question 25 How to make a picture of a background image of a web page? HTML Interview Questions To make a picture a background image on a web page, you should put the following tag code after the </head> tag. Example
  • 28. Question 26 What is the use of a span tag? Explain with example. HTML Interview Questions The span tag is used for following things: For adding colors on text To add background on text Highlight any color text Example
  • 29. Question 27 What is the advantage of collapsing white space? HTML Interview Questions White spaces are a blank sequence of space characters, which is treated as a single space character in HTML. Because the browser collapses multiple spaces into a single space, you can indent lines of text without worrying about multiple spaces. This enables you to organize the HTML code into a much more readable format. White space
  • 30. Question 28 Is there any way to keep list elements straight in an HTML file? HTML Interview Questions By using indents, you can keep the list elements straight. If you indent each sub nested list in further than the parent list, you can easily determine the various lists and the elements that it contains.
  • 31. Question 29 Explain The Key Differences Between LocalStorage And SessionStorage Objects. HTML Interview Questions The localStorage object stores the data without an expiry date. However, sessionStorage object stores the data for only one session. In the case of a localStorage object, data will not delete when the browser window closes. However, the data gets deleted if the browser window closes, in the case of sessionStorage objects. The data in sessionStorage is accessible only in the current window of the browser. But, the data in the localStorage can be shared between multiple windows of the browser.
  • 32. Question 30 When is it appropriate to use frames? HTML Interview Questions Frames can make navigating a site much easier. If the main links to the site are located in a frame that appears at the top or along the edge of the browser, the content for those links can be displayed in the remainder of the browser window.
  • 33. Question 31 How to insert a into a background image of a web page? HTML Interview Questions To insert a background image on a web page, you should put the following tag code after the </head> tag. Example
  • 34. Question 32 What happens if you open the external CSS file in a browser? HTML Interview Questions When you try to open the external CSS file in a browser, the browser cannot open the file, because the file has a different extension. The only way to use an external CSS file is to reference it using <link/> tag within another HTML document.
  • 35. If a single selector includes three different style definitions, the definition that is closest to the actual tag takes precedence. Inline style takes priority over embedded style sheets, which takes priority over external style sheets. Question 33 What is the hierarchy that is being followed when it comes to style sheets? HTML Interview Questions
  • 36. Question 34 How do you create text on a webpage that allows you to send an email when clicked? HTML Interview Questions To change the text into a clickable link to send an email, you need to use the mailto command within the href tag. You can write it in the following way: Example
  • 37. Question 35 How are active links different from normal links? HTML Interview Questions 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. Whereas, 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. Links
  • 38. Question 36 What are the different tags to separate sections of text? HTML Interview Questions The <br> tag is one way to separate the lines of text. There are other tags like the <p> tag and <blockquote> tag that are also used to separate sections of text. Tags
  • 39. Question 37 Are there instances where the text will appear outside of the browser? HTML Interview Questions By default, the text is wrapped to appear within the browser window. However, if the text is part of a table cell with a defined width, the text could extend beyond the browser window.
  • 40. Question 38 Write an HTML table tag sequence that outputs the following: 50 pcs 100 500 10 pcs 5 50 HTML Interview Questions The HTML Code for the problem is: Example
  • 41. Question 39 What is the advantage of grouping several checkboxes together? HTML Interview Questions By default, the text is wrapped to appear within the browser window. However, if the text is part of a table cell with a defined width, the text could extend beyond the browser window.
  • 42. Question 40 What happens if there is no text between the tags? Does this affect the display of the HTML file? HTML Interview Questions If there is no text present between the tags, there is nothing to format. Therefore, no formatting will appear. Some tags, such as the tags without a closing tag like the <img> tag, do not require any text between them.
  • 43. Question 41 What are the limits of the text field size? HTML Interview Questions The default size for a text field is around 13 characters. However, if you include the size attribute, you can set the size value to be as low as 1. The maximum size value will be determined by the browser width. Also, if the size attribute is set to 0, the size will be set to the default size of 13 characters.
  • 44. Question 42 What is the relationship between the border and rule attributes? HTML Interview Questions Default cell borders, with a thickness of 1 pixel, are automatically added between cells if the border attribute is set to a nonzero value. Similarly, If the border attribute is not included, a default 1-pixel border appears when the rules attribute is added to the <table> tag. Border & Rule
  • 45. Question 43 What is SVG? HTML Interview Questions HTML SVG is used to describe the two-dimensional vector and vector or 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.
  • 46. Question 44 What is Button Tag? HTML Interview Questions The button tag is used in HTML 5. It is used to create a clickable button within the HTML form on the web page. This tag creates a “submit” or “reset” button. The button tag code is as follows:
  • 47. Question 45 List the media types and formats supported by HTML. HTML Interview Questions png, jpg, jpeg, gif, apng, svg, bmp, BMP ico, png icoImages Video MPEG, AVI, WMV, QuickTime, RealVideo, Flash, Ogg, WebM, MPEG-4 or MP4 MIDI, RealAudio, WMA, AAC, WAV, Ogg, MP3, MP4 Audio
  • 48. Question 46 What is Cell Spacing and Cell Padding? HTML Interview Questions Cell Spacing is referred to as the space or gap between the two cells of the same table. Whereas, Cell Padding is referred to as the gap or space between the content of the cell and cell wall or cell border.
  • 49. Question 47 What is difference between HTML and XHTML? HTML Interview Questions HTML is an application of Standard Generalized Markup Language. Whereas, XML is an application of Extensible Markup Language. The first one is a static Web Page whereas the later one is a dynamic Web Page. HTML allows programmer to perform changes in the tags and use attribute minimization whereas XHTML when user need a new markup tag then user can define it in this. HTML is about displaying information whereas XHTML is about describing the information.
  • 50. Question 48 How many types of CSS can be included in HTML? HTML Interview Questions There are three ways to include the CSS with HTML: Inline CSS External Stylesheet Internal Stylesheet
  • 51. Question 49 What are logical and physical tags in HTML? HTML Interview Questions Physical tags are used to tell the browser how to display the text enclosed in the physical tag. Some of the examples of physical tags are <b>, <big>, <i>. Physical Tags Logical tags are used to tell the meaning of the enclosed text. The example of the logical tag is <strong> </strong> tag. When we enclose the text in the strong tag, it tells the browser that enclosed text is more important than other texts. Logical Tags
  • 52. Question 50 How can you apply JavaScript to a web page? HTML Interview Questions Inline Script Block Link to JavaScript file
  • 53. MySQL DBA Certification Training www.edureka.co/mysql-dba