<!DOCTYPE html>
tag indicates HTML 5 document.<html>
tag is the container for all other HTML elements (except <!DOCTYPE html>
).<head>
element is a container for metadata (data about data) and is placed between the <html>
tag and the <body>
tag.<body>
element contains all the contents of an HTML document, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.<!DOCTYPE html>
<html>
<head>
<title>This is document title</title>
</head>
<body>
<h1>This is a heading</h1>
<p>Hello World!</p>
</body>
</html>
This is an HTML tutorial
```
<br>
, <hr>
, etc.<h1>
to <h6>
tags.<!DOCTYPE html>
<html>
<head>
<title>Heading, Paragraph and Hyperlink demo</title>
</head>
<body>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
<h1> This is again Heading 1 and you will find a few paragraphs below</h1>
<p>This is first paragraph.</p>
<p>This is second paragraph.</p>
<p>This is third paragraph.</p>
<a href="https://www.facebook.com/wocmnnit">Weekend of Code</a>
<a href="1.html">HTML Structure File</a>
</body>
</html>
<img>
like width, height, etc.<hr>
tag is used to draw a horizontal line in a HTML document.<br>
tag in HTML document is used to create a line break in a text.<hr>
and <br>
tags are empty tags.<hr>
.<!-- ... -->
tag is used for comments.<!DOCTYPE html>
<html>
<head>
<title>Image, HR, BR and Comment demo</title>
</head>
<body>
<img src="frontend.jpg" alt="Frontend Image">
<br>
<br>
<hr>
<img src="backend.jpg" alt="Backend Image">
<hr>
<br>
<p>This is a paragraph</p>
<hr>
<!-- This is a comment. Tell me whether it's visible to you or not. -->
</body>
</html>
<table>
tag is used to display data in tabular form (row * column).<table>
- It defines a table.<tr>
- It defines a row in a table.<th>
- It defines header cell in a table.<td>
- It defines a cell in a table.<caption>
, <colgroup>
, <col>
, etc.<ol>
)<ul>
)<dl>
)<li>
tag is used to specify list elements.<ol>
, <ul>
and <dl>
.#### 4.html
<!DOCTYPE html>
<html>
<head>
<title>Table and List demo</title>
</head>
<body>
<h1>HTML TABLES</h1>
<table border="1">
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
</tr>
<tr>
<td>Row 1 Cell 1</td>
<td>Row 1 Cell 2</td>
<td>Row 1 Cell 3</td>
</tr>
<tr>
<td>Row 2 Cell 1</td>
<td>Row 2 Cell 2</td>
<td>Row 2 Cell 3</td>
</tr>
<tr>
<td>Row 3 Cell 1</td>
<td>Row 3 Cell 2</td>
<td>Row 3 Cell 3</td>
</tr>
</table>
<h1>HTML LISTS</h1>
<h3>Ordered List</h3>
<ol>
<li>Chapter One</li>
<li>Chapter Two
<ol>
<li>Section One</li>
<li>Section Two </li>
<li>Section Three </li>
</ol>
</li>
<li>Chapter Three</li>
</ol>
<h3>Unordered List</h3>
<ul>
<li>bread</li>
<li>coffee beans</li>
<li>milk</li>
<li>butter</li>
</ul>
<h3>Description List</h3>
<dl>
<dt>Name</dt>
<dd>Godzilla</dd>
<dt>Born</dt>
<dd>1952</dd>
<dt>Birthplace</dt>
<dd>Japan</dd>
<dt>Color</dt>
<dd>Green</dd>
</dl>
</body>
</html>
<form>
tag - It is used to define a form.
<form action="server url" method="get|post">
//input controls e.g. textfield, textarea, radiobutton, button
</form>
<input>
tag - It is used to create various types of input fields.
<label>
tag - It defines a label for an input element.<textarea>
tag - Used when we need to take large texts/paragraphs as input.<select>
tag - Used to create drop - down list.<option>
tag - Used to define an option in a drop - down list.<button>
tag - It defines a clickable button.
#### 5.html
<!DOCTYPE html>
<html>
<head>
<title>Form in HTML</title>
</head>
<body>
<h2>Registration form</h2>
<form action="#", method="POST">
<fieldset>
<legend>User personal information</legend>
<label>Enter your full name</label><br>
<input type="text" name="name"><br>
<label>Enter your email</label><br>
<input type="email" name="email"><br>
<label>Enter your password</label><br>
<input type="password" name="pass"><br>
<label>confirm your password</label><br>
<input type="password" name="pass"><br>
<br><label>Enter your gender</label><br>
<input type="radio" id="gender" name="gender" value="male"/>Male <br>
<input type="radio" id="gender" name="gender" value="female"/>Female <br/>
<input type="radio" id="gender" name="gender" value="others"/>others <br/>
<br><label>Hobbies</label><br>
<input type="checkbox" id="vehicle1" name="vehicle1" value="Bike">
<label for="vehicle1">Hobby 1</label><br>
<input type="checkbox" id="vehicle2" name="vehicle2" value="Car">
<label for="vehicle2">Hobby 2</label><br>
<input type="checkbox" id="vehicle3" name="vehicle3" value="Boat">
<label for="vehicle3">Hobby 3</label>
<br>
<br><label>Select Age Group</label><br>
<select name = "dropdown">
<option value = "0-10" selected>0-10 yrs</option>
<option value = "10-20">10-20 yrs</option>
<option value = "20-30">20-30 yrs</option>
<option value = "30-40">30-40 yrs</option>
<option value = "40-50">40-50 yrs</option>
<option value = "50-60">50-60 yrs</option>
</select>
<br>
<br><label>Upload Profile Picture</label><br>
<input type = "file" name = "fileupload" accept = "image/*" />
<br>
<br>Enter your Address:<br>
<textarea></textarea><br>
<input type="submit" value="SIGN-UP">
<input type = "reset" name = "reset" value = "Reset" />
</fieldset>
</form>
</body>
</html>