HTML Interview Questions and Answers
HTML Interview Questions and Answers
1. Can we display a web page inside a web page or Is nesting of webpages possible?
Yes, we can display a web page inside another HTML web page. HTML provides a tag <iframe> using
which we can achieve this functionality.
Tags are the primary component of the HTML that defines how the content will be structured/
formatted, whereas Attributes are used along with the HTML tags to define the characteristics of the
element. For example, <p align=” center”>Interview questions</p>, in this the ‘align’ is the attribute
using which we will align the paragraph to show in the center of the view.
HTML elements which do not have closing tags or do not need to be closed are Void elements. For
Example <br />, <img />, <hr />, etc.
In HTML, a blank sequence of whitespace characters is treated as a single space character, Because
the browser collapses multiple spaces into a single space character and this helps a developer to
indent lines of text without worrying about multiple spaces and maintain readability and
understandability of HTML codes.
In HTML some characters are reserved like ‘<’, ‘>’, ‘/’, etc. To use these characters in our webpage
we need to use the character entities called HTML Entities. Below are a few mapping between the
reserved character and its respective entity character to be used.