HTML 5 Interview Questions and Answers Part 2

1. What is the difference between <b> vs <strong> and <i> vs <em> in html?
Ans. Both tags are rendered as same but the <strong> and <em> tags makes text important.

2. What is bio-directional overriding in html?
Ans. Bio-directional overriding in html is a tag which render the text from one direction to other direction.
 Example :
 <bdo dir="rtl"> Hello </bdo>
  Output :

3.  Which tag is used for marking quotes around an element in html?
Ans. <q> is used to mark quotations around html element.
Example : <a>Hello World</a>
Output : "Hello World"

4. How to highlight text in html?
Ans. <mark> is used to highlight text in html.
Example :  <mark>dotnetqueries</mark>

5. What are empty elements in html?
Ans.Elements with no content are called empty elements.
Example : <br>, <hr>

6. What exactly happens when we use html attribute along with style attributes?   Which one is preferred?
Ans. Generally it is better to use style attributes compare to html attributes as it overrides.
Example :
<!-- style -->
table {
    border:2px solid;

<!-- table -->
<table style="width:200px;border:1px solid;">
<table width="100px" border="0">

Here, the second table width and border values are overriden because of style attribute.


Receive Quality Tutorials Straight in your Inbox by submitting your Email below:

Delivered by FeedBurner

Protected by Copyscape Duplicate Content Checker