HTML Notes
HTML Notes
-webpages are written in HTML which enables us to bring together the text,images,
videos,links etc all into one place.
-HTML is a mark-up language that does all the structuring and formatting job.
-language:It is a language
===================================================================================
Steps in writing HTML code:
1)For writing HTML code,we use notepad
2)A web browser like chrome,mozilla,edge
===================================================================================
HTML tags:
Every HTML code should begin with <HTML> tag and ends with </HTML>
7)<u> :Underline
<html>
<head>
<title> Sample Webpage </title>
</head>
<body>
<b>Python</b> is a <i>General purpose programming</i><br>
<b><u>Python</u></b> is a <i>high-level language</i><br>
</body>
</html>
===================================================================================
HEADINGS :HTML provides 6tags for headings from h1 to h6.
ex:
<!-- Comments in HTML -->
<html>
<head>
<title> Sample Webpage </title>
</head>
<body bgcolor="red" text="yellow">
<b>Python</b> is a <i>General purpose programming</i><br>
<b><u>Python</u></b> is a <i>high-level language</i><br>
<h1>Python Programming</h1>
<h2>Python Programming</h2>
<h3>Python Programming</h3>
<h4>Python Programming</h4>
<h5>Python Programming</h5>
<h6>Python Programming</h6>
</body>
</html>
===================================================================================
<sub> :for subscript
<sup> :for superscript
<strike>:for striking a word,phrase or a sentence
6.scroll delay :
<!--marquee-->
<html>
<head>
<title> Sample Webpage </title>
</head>
<body bgcolor="red" text="yellow">
==============================================================================
HTML Commaon tags
1.HTML images
2.HTML tables
3.HTML Hyperlinks
4.HTML lists
5.HTML forms
6.HTML frames
7.HTML Audio/Video:
===============================================================================
HTML images
-Images increases the visuality of a webpage.
-Images are stored in computer in different formats such as jpg,GIF,BMP
6.Height/width.
<html>
<body>
<img src="C:\Users\DELL\Pictures\hyderabad.jpg">
<img src="C:\Users\DELL\Pictures\hyderabad.jpg">
<img src="C:\Users\DELL\Pictures\hyderabad.jpg">
<img src="C:\Users\DELL\Pictures\hyderabad.jpg">s
</body>
</html>
</body>
</html>
<html>
<body>
<marquee>
<img src="C:\Users\DELL\Pictures\hyderabad.jpg">
</marquee>
</body>
</html>
===================================================================================
================================================
HTML Tables:
ex:
<table>
<caption align="top">table caption </caption>
or
"bottom"
3.bordercolor
5.height
6.width
2)bgcolor
3)bordercolor
==============================================================================
<th>:table header
The following are the attributes
1)Align------->left/right/center
2)bgcolor
3)bordercolor
==============================================================================
<html>
<body bgcolor="red">
<center>
<h1><b><u>Infotech Technologies</u></b></h1>
<table border="20" bordercolor="green" bgcolor="yellow" >
<caption><h3>EMPLOYEE DETAILS</h2></caption>
<tr>
<th>EMPID</th>
<th>EMPNAME</th>
<th>SALARY</th>
</tr>
<tr>
<td>101</td>
<td>Ajay</td>
<td>50000</td>
</tr>
<tr>
<td>102</td>
<td>Rahul</td>
<td>70000</td>
</tr>
<tr>
<td>103</td>
<td>Blake</td>
<td>90000</td>
</tr>
</table>
<br>
<br>
<html>
<body bgcolor="red" text="yellow">
<table border=10 bordercolor="yellow">
<tr>
<td><img src="C:\Users\DELL\Pictures\hyderabad.jpg"></td>
<td><img src="C:\Users\DELL\Pictures\hyderabad.jpg"></td>
</tr>
<tr>
<td><img src="C:\Users\DELL\Pictures\hyderabad.jpg"></td>
<td><img src="C:\Users\DELL\Pictures\hyderabad.jpg"></td>
</tr>
</table>
</html>
==============================================================================
ex: image and table within a table
==============================================================================
Hyperlinks: moving from one page to another page
ex:1
<!--anchor1.html-->
<html>
<body bgcolor="yellow" text="red">
<a href="13sample1.html"><b><h2>Click here</b></a> to display the details</h2>
</body>
</html>
<!--sample1.html-->
<html>
<body bgcolor="red" text="yellow">
<h1>Welcome to Django World!!!</h1>
</body>
</html>
------------------------------
ex:2
<html>
<body bgcolor="yellow" text="red">
<a href="https://www.google.com/"><b><h2>Click here</b></a> to open Google</h2>
</body>
</html>
-------------------------------
ex:3
<html>
<body bgcolor="yellow" text="red">
<a href="https://www.python.org/"><b><h2>click here</b></a> to open python
</body>
</html>
--------------------------------
ex:4 Even images can be used as hyperlinks
16fruit.html
<html>
<body>
<img src="C:\Users\DELL\Pictures\fruit.jpg">
</body>
</html>
17flower.html
<html>
<body>
<h2><i>Click the flower to get a fruit</i></h2>
<a href="16fruit.html"><img src="C:\Users\DELL\Pictures\flower.jpg"></a>
</body>
</html>
==============================================================================
HTML Lists:
1.Un-ordered lists
2.Ordered lists
3.Nested list (or) Miscellaneous lists
-Here every list item starts with <li> and ends with </li>
ex:
<ul type="circle">...................>circular markers
<ul type="disc"> -------------------->disc markers
<ul type="square">------------------->squared markers
<html>
<body bgcolor="yellow" text="blue">
<ul type="square"><h1>Electronics Products</h1>
<h2>
<li>Sony</li>
<li>Samsung</li>
<li>Lenovo</li>
<li>philips</li>
<li>DEL</li>
</ul>
</body>
</html>
-------------------------------------------------------
2)ordered list : <ol>...........</ol>
-Here we display the data using numbering or leterring i.e using Roman numbers,
capital letters,small letters,numbers etc.
<html>
<head>
<title> City Cable Network</title>
</head>
<body bgcolor="yellow" text="blue">
I.Datatypes
1.Integer
2.float
3.Boolean
4.string
5.complex
II.Operators
a)Arithmetic operators
i.+
ii.-
iii.*
iv./
V.//
vi.%
b)Comparision operators
i.>
ii.<
iii.>=
iv.<=
==============================================================================