Skip to main content

basic HTML tutorial

  1. HTML Introduction
  2. HTML Tags
HTML tutorial

* It looks like base of web development
* It is a markup language
* HTML stands for Hyper Text Markup Language
* It also include other type files like CSS and Javascript
* All the html files are web pages
Syntex for basic HTML code -
HTML is nothing without tags because all contents of html , we write between tags . In next section , we are going to
discuss HTML tags .

Syntex of Tags -

<tag name> Content </tag name>

* we write all content between tags , start and end tag
* tags define the type and attribute of content written between tags


Basic Tags
TagsHow this works
<html>.....</html>html webpage start and end tag
<head>.....</head>all meta tags and search engine related tags
<body>.....</body>entire content that looks on browser screen
theese are headings tags
heading between h1 tags , is of maximum size
heading between h6 tags , is of minimum size
<p>.....<p>to write a paragraph
<br>to break the line on web page
<hr>to insert a single line break
<!--.....-->defines comments like <!-- kuldeep gupta --> will not show on browser


TagsHow this works
<acronym title="fundaofbasics">fundaofbasics</acronym>Defines an Acronym
<abbr>to define abbreviation
Written by funda og basics <br>
<a href=""> Email us </a> <br>
Address : distt-Kota , Rajasthan <br>
Mobile : 1234567890
Contact information or Address
<b>This text is bold</b>defines bold text
<big>This Text is Big</big>defines big text
<center>This content comes in center </center>to make the content in mid of the browser screen
My shirt was <del> red </del> <ins> blue </ins>.defines text that has been deleted
<font face="arial" color="blue" size="2"> Write text here . </font>.to define font family , size , color
<i>this text is Italic </i>to write Italic text
<pre>.....</pre>to write something exactly same as written between pre tags
<small>This text is small </small>defines smaller text
<strike>Not Available !</strike> Now Available !defines strikethrough text
<u>.....</u>defines underlined text


TagsHow this works
<form action="newPage.html" method="post">
Enter Name : <input type="text" name="yname"> <br>
<input type="submit" value="Submit">
to define a form for user Input
<input type="button" value="It is a Button">
Types are -
<input type="checkbox" name=city value="Select City">
<input type="radio" name=gen value="Female">
<input type="file" name=userfile >
<input type="image" name=upic src="images/pic.jpg" width="100" height="100" >
<input type="reset" value="Reset">
<input type="text" name="cname" value="Enter text ">
<textarea name="address" cols="50" rows="5"> </textarea>defines multiple input lines text area
<select name="city">
<option name="1"> Jaipur </option>
<option name="2">Delhi</option>
<option name="3">Gujrat</option>
to define a Drop Down list
<optgroup label="fruit">
<option> Apple </option>
<optgroup label="car">
defines all related options in drop down list


TagsHow this works
<table border=1 width=100% height=100%>
<tr><th> Car Name </th> <th> Prize</th></tr>
<tr><td> Maruti Desire</td> <td> 6 lack</td> </tr>
<tr><td>TATA Nano </td> <td> 3 lack</td> </tr>
<tr><td>Swift</td> <td> 5 lack</td> </tr>
to define a table .
tr = table row
th = table header
td = table column


TagsHow this works
<frameset cols="50%,50%">
<frame src="page1.html"/>
<frame src="page2.html"/>
to open more than one web page in single window
<noframes>.....</noframes>to show message if browser does not support frames
<iframe src=""> </iframe>to define an Inline frame