Showing posts with label Html. Show all posts
Showing posts with label Html. Show all posts

Wednesday, 18 July 2012

How to use noscript tag in html


<!DOCTYPE html>
<html>
<body>

<script type="text/javascript">
document.write("Hello World!")
</script>
<noscript>Sorry, your browser does not support JavaScript!</noscript>

<p>A browser without support for JavaScript will show the text in the noscript element.</p>

</body>
</html>

Wednesday, 18 July 2012 by Unknown · 0

How to insert a script in html


<!DOCTYPE html>
<html>
<body>

<script type="text/javascript">
document.write("Hello india!")
</script>

</body>
</html>

by Unknown · 0

How to Specify a title for a document in html


Example to Specify a title for a document in html

<!DOCTYPE html>
<html>
<head>
<title>My first HTML page</title>
</head>

<body>
<p>The content of the body element is displayed in the browser.</p>
<p>The content of the title element is displayed in the browser's title.</p>
</body>

</html>


by Unknown · 0

How to create inline frame using html

Example to create inline frame using html


<!DOCTYPE html>
<html>
<body>

<iframe src="http://collegeprojectandtests.blogspot.in/"></iframe>

<p>Some browsers don't support iframes.</p>
<p>If they don't, the iframe will not be visible.</p>


</body>
</html>

Result:



Some browsers don't support iframes.
If they don't, the iframe will not be visible.

by Unknown · 0

How to create email form using html

Example to  create email form using html

<!DOCTYPE html>
<html>
<body>

<h3>Send e-mail to someone@example.com:</h3>

<form action="MAILTO:someone@example.com" method="post" enctype="text/plain">
Name:<br />
<input type="text" name="name" value="your name" /><br />
E-mail:<br />
<input type="text" name="mail" value="your email" /><br />
Comment:<br />
<input type="text" name="comment" value="your comment" size="50" />
<br /><br />
<input type="submit" value="Send">
<input type="reset" value="Reset">

</form>
</body>
</html>

Result:

Send e-mail to someone@example.com:

Name:

E-mail:

Comment:


by Unknown · 0

How to create Form with radiobuttons and a submit button using html


<!DOCTYPE html>
<html>
<body>

<form name="input" action="html_form_action.asp" method="get">
<input type="radio" name="sex" value="male" /> Male<br />
<input type="radio" name="sex" value="female" /> Female<br />
<input type="submit" value="Submit" />
</form>

<p>If you click the "Submit" button, the form-data will be sent to a page called "html_form_action.asp".</p>

</body>
</html>

Result Is:

Male
Female
If you click the "Submit" button, the form-data will be sent to a page called "html_form_action.asp".

by Unknown · 0

How to create Form with checkboxes and a submit button using html


<!DOCTYPE html>
<html>
<body>

<form name="input" action="html_form_action.asp" method="get">
<input type="checkbox" name="vehicle" value="Bike" /> I have a hyundai car<br />
<input type="checkbox" name="vehicle" value="Car" /> I have a honda bike
<br /><br />
<input type="submit" value="Submit" />
</form>

<p>If you click the "Submit" button, the form-data will be sent to a page called "html_form_action.asp".</p>

</body>
</html>

Result Is:

I have a hyundai car
I have a honda bike

If you click the "Submit" button, the form-data will be sent to a page called "html_form_action.asp".

by Unknown · 0

How to create Form with text fields and a submit button using html


<!DOCTYPE html>
<html>
<body>

<form name="input" action="html_form_action.asp" method="get">
First name: <input type="text" name="FirstName" value="Hari" /><br />
Last name: <input type="text" name="LastName" value="Priya" /><br />
<input type="submit" value="Submit" />
</form>

<p>If you click the "Submit" button, the form-data will be sent to a page called "html_form_action.asp".</p>

</body>
</html>

Result is:



First name:
Last name:
If you click the "Submit" button, the form-data will be sent to a page called "html_form_action.asp".

by Unknown · 0

Tuesday, 17 July 2012

How to Draw a border around form-data using html


<!DOCTYPE html>
<html>
<body>

<form action="">
<fieldset>
<legend>Personal information:</legend>
Name: <input type="text" size="30" /><br />
E-mail: <input type="text" size="30" /><br />
Date of birth: <input type="text" size="10" />
</fieldset>
</form>

</body>
</html>

Result is:


Personal information: Name:
E-mail:
Date of birth:

Tuesday, 17 July 2012 by Unknown · 0

How to create a button using html


<!DOCTYPE html>
<html>
<body>

<form action="">
<input type="button" value="Hello!">
</form>

</body>
</html>


Result:

by Unknown · 0

How to create textarea using html


<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<textarea cols="30" rows="10">My dog is here
</textarea>


</div>

by Unknown · 0

How to create simple drop down list using html


<!DOCTYPE html>
<html>
<body>

<form action="">
<select name="cars">
<option value="maruthi">maruthi</option>
<option value="hyundai">hyundai</option>
<option value="fiat">Fiat</option>
<option value="audi">Audi</option>
</select>
</form>

</body>
</html>

by Unknown · 0

How to create radio buttons using html


<!DOCTYPE html>
<html>
<body>

<form action="">
<input type="radio" name="sex" value="male" /> Male<br />
<input type="radio" name="sex" value="female" /> Female
</form>

<p><b>Note:</b> When a user clicks on a radio-button, it becomes checked, and all other radio-buttons with equal name become unchecked.</p>

</body>
</html>

by Unknown · 0

How to create checkboxes using html


<!DOCTYPE html>
<html>
<body>

<form action="">
<input type="checkbox" name="vehicle" value="cycle" /> I have a cycle<br />
<input type="checkbox" name="vehicle" value="Car" /> I have a car
</form>

</body>
</html>

by Unknown · 0

How to create username and password field using html


<!DOCTYPE html>
<html>
<body>

<form action="">
Username: <input type="text" name="user" /><br />
Password: <input type="password" name="password" />
</form>

<p><b>Note:</b> The characters in a password field are masked (shown as asterisks or circles).</p>

</body>
</html>

by Unknown · 0

How to create Create text fields using html


<!DOCTYPE html>
<html>
<body>

<form action="">
First name: <input type="text" name="firstname" /><br />
Last name: <input type="text" name="lastname" />
</form>

<p><b>Note:</b> The form itself is not visible. Also note that the default width of a text field is 20 characters.</p>

</body>
</html>

by Unknown · 0

How to create definition list using html


<!DOCTYPE html>
<html>
<body>

<h4>A Definition List:</h4>
<dl>
  <dt>Coffee</dt>
  <dd>Black hot drink</dd>
  <dt>Milk</dt>
  <dd>White cold drink</dd>
</dl>

</body>
</html>

by Unknown · 0

How to create Nested list using html


<!DOCTYPE html>
<html>
<body>

<h4>A nested List:</h4>
<ul>
  <li>Tea</li>
  <li>Cocoa
    <ul>
    <li>Black tea</li>
    <li>Cocoa</li>
    </ul>
  </li>
  <li>Milk</li>
</ul>

</body>
</html>

by Unknown · 0

How to create Different types of unordered Lists sing html


<!DOCTYPE html>
<html>
<body>

<h4>Disc bullets list:</h4>
<ul type="disc">
 <li>Banana</li>
 <li>Bananas</li>
 <li>Lemon</li>
 <li>Orange</li>
</ul>

<h4>Circle bullets list:</h4>
<ul type="circle">
 <li>Apples</li>
 <li>Bananas</li>
 <li>plum</li>
 <li>palm</li>
</ul>

<h4>Square bullets list:</h4>
<ul type="square">
 <li>Carrot</li>
 <li>Beans</li>
 <li>cocoa</li>
 <li>Orange</li>
</ul>

</body>
</html>

by Unknown · 0

How to create Different types of ordered lists using html


<!DOCTYPE html>
<html>
<body>

<h4>Numbered list:</h4>
<ol>
 <li>plum</li>
 <li>lemon</li>
 <li>juice</li>
 <li>Oranges</li>
</ol>

<h4>Letters list:</h4>
<ol type="A">
 <li>papays</li>
 <li>banyan</li>
 <li>Lemons</li>
 <li>Oranges</li>
</ol>

<h4>Lowercase letters list:</h4>
<ol type="a">
 <li>Apples</li>
 <li>Bananas</li>
 <li>Lemons</li>
 <li>coconut</li>
</ol>

<h4>Roman numbers list:</h4>
<ol type="I">
 <li>Apples</li>
 <li>Bananas</li>
 <li>Lemons</li>
 <li>Oranges</li>
</ol>

<h4>Lowercase Roman numbers list:</h4>
<ol type="i">
 <li>Flowers/li>
 <li>rose</li>
 <li>Lemon</li>
 <li>Oranges</li>
</ol>

</body>
</html>

by Unknown · 0