HTML Questions
Warm up for HTML questions with most asked questions and answers for junior, mid, and senior roles.
In how many ways you can display HTML elements?
Show AnswerHide Answer
There are four ways to display an HTML element.
1. Block
2. Inline
3. List
4. Table
What are logical and physical tags in HTML?
Show AnswerHide Answer
Physical Tags are used to indicate that how specific characters are to be formatted or indicated using HTML tags.
Logical tags are also known as structural tags that describe the behavior, nature of the content for the enclosed text.
What is difference between HTML and XHTML?
Show AnswerHide Answer
HTML is the standard markup language for creating web pages.
XHTML is a family of XML languages which extend or mirror versions of HTML.
It does not allow omission of any tags or use of attribute minimization. XHTML requires that there be an end tag to every start tag and all nested tags must be closed in the right order.
What are void elements in HTML?
Show AnswerHide Answer
A void element cannot have any content but may have attributes. Void elements are self-closing, so they must not have a closing tag.
What is the advantage of collapsing white space?
Show AnswerHide Answer
Collapsing white space is used to reduce the size of the web page.
When is it appropriate to use frames?
Show AnswerHide Answer
When you want to display multiple web pages on the same page.
What is an image map?
Show AnswerHide Answer
tag defines an imagep map. An image map is a collection of areas on an image, that are clickable and link to a page.What is semantic HTML?
Show AnswerHide Answer
Semantic HTML is a way to make the content of a web page more readable.
For example:
How do you keep list elements straight in an HTML file?
Show AnswerHide Answer
You can keep the list elements straight by using indents in an HTML file.
How many tags can be used to separate a section of texts?
Show AnswerHide Answer
There are 3 types of tags that can be used to separate a section of texts:
Can you create a multi-colored text on a web page?
Show AnswerHide Answer
…
tags for every character that you want to apply color.