• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
  • Skip to footer
  • Core Java
  • Design Patterns
  • JSP
  • Servlets
  • Building Tools
  • jQuery
  • Spring
  • Hibernate
  • Mongo DB
  • More
    • HTML
    • SCJP
    • AJAX
    • UML
    • Struts
    • J2EE
    • Testing
    • Angular JS

J2EE Reference

  • Home
  • About Us
    • Java Learning Centers
  • Contact Us

HTML

HTML QUIZ

February 11, 2013 By j2eereference Leave a Comment

HTML QUIZ

Start
Congratulations - you have completed HTML QUIZ. You scored %%SCORE%% out of %%TOTAL%%. Your performance has been rated as %%RATING%%
Your answers are highlighted below.
Question 1
What does HTML stand for?
A
Home Tool Markup Language
B
Hyper Text Markup Language
C
Hyperlinks and Text Markup Language
D
Hyper Tool Markup Language
Question 2
Which tags are most commonly used by search engines?
A
Heading
B
Title
C
Paragrah
D
All of above
Question 3
What is the attribute for <image> tag?
A
pt
B
url
C
path
D
src
Question 4
Who is making the Web standards?
A
Microsoft
B
Mozilla
C
The World Wide Web Consortium
D
IBM
Question 5

How can we resize the image?

A
Using resize attribute
B
Using height and width
C
Using size attribute
D
Using rs attribute
Question 6

What attribute is used to specify number of rows?

A
Rownum
B
Rownumb
C
rn
D
Rowspan
Question 7
Which of the following tags below are used for a multi-line text input control?
A
textml tag
B
text tag
C
textarea tag
D
Both b and c above
Question 8

What is cell padding?

A
Used to separate cell walls from their contents.
B
Used to set space between cells
C
Both a and b above
D
Used to provide width to a cell
Question 9
What are <div> tags used for?
A
To replace paragraphs. i.e. p tags
B
To logically divide the paragraphs
C
To logically divide the document
D
To provide space between tables
Question 10
Each list item in an ordered or unordered list has which tag?
A
list tag
B
ls tag
C
li tag
D
ol tag
Question 11
What is the correct HTML for creating a hyperlink?
A
j2eereference.com
B
j2eereference
C
j2eereference.com
D
http://209.97.166.197
Question 12
What are meta tags used for?
A
To store information usually relevant to browsers and search engines.
B
To only store information usually relevant to browsers
C
To only store information about search engines.
D
To store information about external links
Question 13
How can you open a link in a new browser window?
A
B
C
D
None of the above
Question 14
What is the correct HTML for making a drop-down list?
A
B
C
D
Question 15
What is the correct HTML for making a text area?
A
B
1
&lt;label&gt;Email:

1
&lt;input type=email form=x name=email&gt;

1
&lt;/label&gt;

1
&lt;form id=x&gt;&lt;/form&gt; // This can be anywhere in the page.

1
 

3. required

The new required attribute applies to input (except when the type attribute is hidden, image or some button type such as submit) and textarea. It indicates that the user has to fill in a value in order to submit the form.

Example

Your Name : <input type=text form=x name=name required>

<form id=x></form>

if you try to  submit the form without filling the text filed you will get an error saying “please fill out this field”

4.  autofocus

This attribute can be specified on the input (except when the type attribute is hidden), select, textarea and button elements. It provides a declarative way to focus a form control during page load.

Example : <input type=text form=x name=name autofocus>

5.  novalidate

If you use novalidate attribute in form element that form will disable form validation submission

New Elements added in HTML5

1.mark

This can be used if you want to highlight some portion of the text

Example:

<p>Thanks for visiting <mark>http://209.97.166.197</mark>.</p>

Here the text http://209.97.166.197 will be highlighting in yellow color

2. meter

This can be used to represent a scalar measurement within a known range, or a fractional value.

Example:

Your Disk storage status :  <meter min=0 max=100 value=75 title=”centimeters”></meter>

Now lets consider implement all the above features and see how it works

HTML Code :

<!doctype html>
<title>HTML 5</title>

<table border=”0″ width=”100%”>
<tr>
<td width=”303″>Yor name (Required):</td>
<td>
<input type=text form=x name=name required autofocus></td>
</tr>
<tr>
<td width=”303″>Email</td>
<td> <input type=email form=x name=email placeholder=admin@209.97.166.197</td>
</tr>
<tr>
<td width=”303″>Your search keyword here</td>
<td> <input type=search name=keyWord form=x></td>
</tr>
<tr>
<td width=”303″>Your URL here : </td>
<td> <input type=url name=path0  form=x></td>
</tr>
<tr>
<td width=”303″>Your Age :</td>
<td> <input type=number name=age0  form=x></td>
</tr>
<tr>
<td width=”303″>Month :</td>
<td><input type=month name=mon0  form=x></td>
</tr>
<tr>
<td width=”303″>Date of Birth :</td>
<td><input type=date name=dob0  form=x></td>
</tr>
<tr>
<td width=”303″>Time of Birth :</td>
<td> <input type=time name=timeOfBirth0  form=x></td>
</tr>
<tr>
<td width=”303″>Week </td>
<td><input type=week name=week0  form=x></td>
</tr>
<tr>
<td width=”303″>Date Time : </td>
<td> <input type=datetime name=datetime0  form=x></td>
</tr>
<tr>
<td width=”303″>How good you are in Java (0 – 100 range) </td>
<td><input type=range name=range0 min=0 max=100 step=10 value=50 form=x></td>
</tr>
<tr>
<td width=”303″>Date time local :</td>
<td><input type=datetime-local name=dateTimeLocal0  form=x></td>
</tr>
<tr>
<td width=”303″>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>

&nbsp;<form id=x action=#>
<p>
<input type=submit  form=x>
</p>
</form>
<p>Thanks for visiting <mark>http://209.97.166.197m</mark>.</p>

Your completion status  <meter min=0 max=100 value=75 title=”centimeters”></meter>

The above HTML can be view in browser (Google Chrome)  as follows.

Filed Under: HTML

Primary Sidebar

FOLLOW US ONLINE

  • View J2eereference-166104970118637’s profile on Facebook
  • View j2eereference’s profile on Twitter
  • View j2eereference’s profile on LinkedIn

Subscribe by email

Recent posts

  • Java Buzzwords
  • Anonymous Inner Class in Java
  • Network Programming – java.net Package
  • Java Regular Expressions
  • Method Local Inner Class in Java
  • URL Processing in Java
  • Iterator Design Pattern Implementation using Java
  • Strategy Design Pattern Implementation using Java
  • Decorator Design Pattern
  • Adapter Design Pattern Implementation using Java
  • JSF Composite Components
  • JSF UI Components
  • What is JavaServer Faces (JSF)?
  • GOF Design Patterns
  • History and Need for Design Patterns

Footer

Core Java
Design Patterns
JSP
Servlets
HTML
Building Tools
AJAX
SCJP
jQuery
Testing
Spring
UML
Struts
Java Centers
Java Training
Home
About Us
Contact Us
Copyright © j2eereference.com. All right reserved.