All in One HTML Notes
All in One HTML Notes
1) What is Website ?
http://miracledeveloper.epizy.com
3) Web Browser
4) Web Server
• The web Pages are Retrieved from the Original Location with the
help Of Url
• Whatever data you send from your browser to the web server.
7) HTTPS
• Static Website
• Dynamic Website
• E-Commerce Website
• Web Portals
• Business website
• Entertainment Website
• Movie Website
HTML Basic
<!DOCTYPE html>
<html>
<head>
</head>
<body>
Output:-
Examples
Code :
<!doctype html>
<html>
<head>
</head>
<body>
HTML</p>
<p> This product is available on Rs.1000 but you will get this
<p>x<sup>2</sup>+x+c</p>
<p>H<sub>2</sub>O</p>
</body>
</html>
HTML LIST
HTML List Tags
Tag Description
The list items will be marked with bullets (small black circles) by default:
Example
<ul type="square">
<li>This is unordered list</li>
<li>This is unordered list</li>
Value Description
disc Sets the list item marker to a bullet (default)
<ul type="square">
<li>This is unordered list</li>
<li>This is unordered list</li>
<li>
<ul>
<li>This is HTML </li>
<li>This is HTML </li>
<li>This is HTML </li>
</ul>
</li>
<ol type="a">
<li>This is ordered list</li>
<li>This is ordered list</li>
<li>This is ordered list</li>
</ol>
Ordered HTML List – The Type Attribute
The type attribute of the <ol> tag, defines the type of the list item marker:
Type Description
type="I" The list items will be numbered with uppercase roman numbers
type="i" The list items will be numbered with lowercase roman numbers
Control List Counting
By default, an ordered list will start counting from 1. If you want to start
counting from a specified number, you can use the start attribute:
Example
<ol start="50">
<li>C</li>
<li>C++</li>
<li>JAVA</li>
</ol>
<ol type="a">
Tag Description
Code:
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<h1>Admission Form </h1>
<form>
<fieldset>
<legend>Form:</legend>
<input type="text" placeholder="Enter your Name" required=""
autofocus="" maxlength="10"> <br><br>
<input type="tel" placeholder="Enter your Phone no"> <br><br>
<input type="email" placeholder="Enter your Email "> <br><br>
<input type="text" placeholder="Enter your Courses"> <br><br>
<input type="password" placeholder="Enter your password"> <br><br>
<input type="date" placeholder="Enter your date"> <br><br>
<input type="datetime-local" placeholder="Enter your Local Date &
Time"> <br><br>
<input type="week" placeholder="Enter the week"> <br><br>
<input type="search" placeholder="Enter your Quries"> <br><br>
<input type="month" placeholder="Enter the month" readonly="">
<br><br>
<input type="time" placeholder="Enter the time" disabled=""> <br><br>
<input type="number" min="1" max="5" placeholder="Enter your number">
<br><br>
<label> Gender:- </label> <br> <br>
<input type="radio" name="G1" checked=""> Male <br> <br>
<input type="radio" name="G1"> Female <br><br>
<select name="Admission">
<optgroup label="Rich People">
<option value="rp">Please select one Billionaire"</option>
<option value="Bill"> Bill Gates </option>
<option value="Elon"> Elon Musk</option>
<option value="Jeff"> Jeff Bezoz</option>
<option value="Warren"> Warren Buffet</option>
</optgroup>
</select> <br><br>
<textarea name="text" cols="30" rows="10">Write your
Feedback</textarea> <br> <br>
<input type="button" value="Submit Now">
<!-- <button>Submit Now </button> -->
<input type="reset" value="Reset Now">
</fieldset>
</form>
</body>
</html>
HTML Tables
A table in HTML consists of table cells inside rows and columns
Table Cells
Each table cell is defined by a <td> and a </td> tag.
Everything between <td> and </td> are the content of the table cell.
Table Rows
Each table row starts with a <tr> and end with a </tr> tag.
Table Headers
Sometimes you want your cells to be headers, in those cases use the <th> tag
<tbody>
<tr>
<td>Yash</td>
<td>978546</td>
<td>Software Engineer</td>
</tr>
<tr>
<td>Ayush</td>
<td>99856</td>
<td>Programmer</td>
</tr>
<tr>
<td>Umesh</td>
<td>546123</td>
<td>Product Manager</td>
</tr>
</tbody>
</table>
<table>
HTML Vertical TABLE
<body>
<table>
<H3>This is Vertical Table </H3>
<tr>
<th>Name </th>
<td>Virat</td>
<td>Dhoni</td>
</tr>
<tr>
<th>Employee ID </th>
<td>4578983</td>
<td>7989466</td>
</tr>
<tr>
<tr>
<td><label>Email</label></td>
<td><input type="email"></td>
</tr>
<tr>
<td><label>Tel No.</label></td>
<td><input type="tel"></td>
</tr>
<tr>
<td><label>Roll No.</label></td>
<td><input type="number"></td>
</tr>
</form> </table>
Hyperlink in Html
Using anchor tag <a>..</a>
<a href=”https://www.instagram.com/”>
Image Map in HTML
The HTML <map> tag defines an image map. An image map is an image with
clickable areas. The areas are defined with one or more <area> tags.
The idea behind an image map is that you should be able to perform different
actions depending on where in the image you click.
The <map> element is used to create an image map, and is linked to the
image by using the required name attribute:
The Areas
Then, add the clickable areas.
Shape
You must define the shape of the clickable area, and you can choose one of
these values:
UseMap
The usemap value starts with a hash tag # followed by the name of the
image map, and is used to create a relationship between the image and
the image map.
Chapter Summary
Code :
<!doctype html>
<html>
<head>
</head>
<body>
</html>
Audio tags
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<audio controls="" preload="" autoplay="" muted="">
<source src="Audio.mpeg" type="audio/mp3">
</audio>
</body>
</html>
Video Tags
If we use poster the first remove the preload and
Autoplay attributes.
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
<video controls="" loop="" autoplay="" preload="" muted=""
poster="sachin.jpg">
<source src="vs.mp4" type="video/mp4">
</video>
</body>
</html>
Image in HTML
Chapter Summary
Use the HTML <img> element to define an image
Use the HTML src attribute to define the URL of the image
Use the HTML alt attribute to define an alternate text for an image, if it
cannot be displayed
Code:
<!DOCTYPE html>
<html>
<body>
<h2>HTML Image</h2>
The <span> tag is easily styled by CSS or manipulated with JavaScript using
the class or id attribute.
The <span> tag is much like the <div> element, but <div> is a block-level
element and <span> is an inline element.
<!DOCTYPE html>
<html>
<body>
</
body>
</html>
The <div> tag is used as a container for HTML elements - which is then
styled with CSS or manipulated with JavaScript.
Note: By default, browsers always place a line break before and after
the <div> element.
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h2>This
is a heading in
a div
element</h2>
</div>
</body></html>
HTML Comments
HTML comments are not displayed in the browser, but they can help document your
HTML source code.
Example
<!-- This is a comment -->
<p>This is a paragraph.</p>