HTML 5 Interview Questions and Answers Part 3

1. How to set background for two columns if tables have four columns? Is it possible?
Ans. Yes, it is possible to set background color for targeted columns instead of whole table. The tag "colgroup" is used for that.
Example :
 <table>
 <CAPTION>DOTNETQUERIES</CAPTION>
  <colgroup>
    <col span="2" style="background-color:gray">   
  </colgroup>
  <tr>
    <th>MVC.NET</th>
    <th>ASP.NET</th>
    <th>WCF</th>
    <th>WPF</th>
  </tr>
  <tr>
    <td>NO</td>
    <td>NO</td>
    <td>YES</td>
    <td>YES</td>
  </tr>
</table>


2. Which property used to display list horizontally?
Ans. "display:inline" property

3. What color this rgb(0,255,0) value resembles?
Ans. Color is "Green", Since rgb(RRR,GGG,BBB) the green part is set to full(i.e., 255).

4. Why <noscript> tags are used in html pages?
Ans. When browsers don't support client side scripts or scripts are disabled at that time content in this tags will be displayed.

5. How to refresh document for every 20 seconds using meta tags in html?
Ans. Here is the syntax, <meta http-equiv="refresh" content="20">

6. What is the use of <base> element in html?
Ans. The <base> element defines the default link address or default target for all the urls on a page.
Example:
<base href="http://www.dotnetqueries.com/images/" target="_blank">
<img src="image1.png" alt="image1">
Here, src attribute looks for image at "http://www.dotnetqueries.com/images/image1.png" location as it is default address provided in base element.
Note: target="_blank" resembles that page will be opened in new window tab.


7. What is the full form of &nbsp; and what is it entity code?
Ans. It stands for non-breaking space and its code is "&#160;"

8. What is attribute minimization in html?
Ans. Partial declaring an attribute is known as attribute minimization.

Example :
<input type="checkbox" name="MVC.NET" value="mvc" checked />  --> MINIMIZATION
<input type="checkbox" name="ASP.NET" value="asp" checked="checked" /> -- AVOIDING MINIMIZATION.
It is always recommended to avoid attribute minimization.



Subscribe

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

Delivered by FeedBurner

Protected by Copyscape Duplicate Content Checker