HTML
HTML
asdfghjklzxcvbnmqwertyuiopasdfghjklz
xcvbnmqwertyuiopasdfghjklzxcvbnmqw
ertyuiopasdfghjklzxcvbnmqwertyuiopas
dfghjklzxcvbnmqwertyuiopasdfghjklzxc
vbnmqwertyuiopasdfghjklzxcvbnmqwert
yuiopasdfghjklzxnmqwertyuiopasdfghjkl
zxcvbnmqwertyuiopasdfghjklzxcvbnmq
wertyuiopasdfghjklzxcvbnmqwertyuiopa
sdfghjklzxcvbnmqwertyuiopasdfghjklzx
cvbnmqwertyuiopasdfghjklzxcvbnmqwe
rtyuiopasdfghjklzxcvbnmqwertyuiopasdf
ghjklzxcvbnmqwertyuiopasdfghjklzxcvb
nmrtyuiopasdfghjklzxcvbnmqwertyuiopa
sdfghjklzxcvbnmqwertyuiopasdfghjklzx
cvbnmqwertyuiopasdfghjklzxcvbnmqwe
rtyuiopasdfghjklzxcvbnmqwertyuiopasdf
ghjklzxcvbnmqwertyuiopasdfghjklzxcvb
HTML (HYPER TEXT MARKUP
LANGUAGE)
HTML stands for Hyper Text Markup Language
HTML is the standard markup language for creating Web pages
HTML describes the structure of a Web page
HTML elements label pieces of content such as "this is a heading", "this is
a paragraph", "this is a link"
</body>
</html>
EXPANTION OF PROGRAM:
`<!DOCTYPE>`: Defines the document type.
2. `<html>`: Defines the root element of an HTML document.
3. `<head>`: Contains metadata and other header elements.
4. `<title>`: Defines the title of the document.
5. `<body>`: Contains the visible content of the document.
6. `<h1>` to `<h6>`: Define headings of different levels.
7. `<p>`: Defines a paragraph.
SO THIS IS THE GENERAL STRUCTURE OF HTML.
PROGRAM:1
<!DOCTYPE html>
<html>
<head>
<title>
DHRUV
</title>
</head>
<body>
<center><h1> Heading Tags<br>
Hello Priyanka <br></h1>
<h2>Hello Tharshini<br></h2>
<h3>Hello Jeni<br></h3>
<h4>Hello Gugan<br></h4>
<h5>Hello Loki<br></h5>
<h6>Hello Sandhiya</h6></center>
</body>
</html>
<center>Text Formatting</center>
<b>Bold</b><br>
<i>Italics</i><br>
<u>underline</u><br>
Sub<sub>Script</sub><br>
Super<sup>Script</sup><br>
<strike>Strike Through</strike>
HTML Lists:
HTML lists allow web developers to group a set of related items in lists.
Example
An unordered HTML list:
Item
Item
Item
Item
An ordered HTML list:
1. First item
2. Second item
3. Third item
4. Fourth item
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
</body>
</html>
Output:
HTML Paragraphs
A paragraph always starts on a new line, and is usually a block of text.
HTML Paragraphs
The HTML <p> element defines a paragraph.
A paragraph always starts on a new line, and browsers automatically add some white
space (a margin) before and after a paragraph.
<!DOCTYPE html>
<html>
<head>
<style>
p{
color: navy;
text-indent: 30px;
text-transform: uppercase;
}
</style>
</head>
<body>
<h1>Style paragraphs with CSS</h1>
<p> On the Insert tab, the galleries include items that are designed to coordinate with the
overall look of your document. You can use these galleries to insert tables, headers, footers,
lists, cover pages, and other document building blocks. When you create pictures, charts, or
diagrams, they also coordinate with your current document look.
</p>
</body>
</html>
<!DOCTYPE html>
<head>
<title>
Day 2
</title>
</head>
<body>
<mark>priya</mark>
<a href="https://web.whatsapp.com">Sharu</a>
<hr>
<table border="2">
<tr>
<th>Sno</th>
<th>Name</th>
<th>Age</th>
<th>Number</th>
</tr>
<tr>
<td>1</td>
<td>Sharu</td>
<td>70</td>
<td>2008</td>
</tr>
<tr>
<td>2</td>
<td>Susi</td>
<td>170</td>
<td>2004</td>
</tr>
<tr>
<td>3</td>
<td>Suji</td>
<td>80</td>
<td>2008</td>
</tr>
</table>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>
Day 5
</title>
</head>
<body>
<h1>More on Tables</h1>
<table>
<tr>
<td>
<form>
<label>
Student Name
</label>
</td>
<td>
<input type="text" placeholder="Enter Student Name" required>
</form>
</td>
<td>
<form>
<label>
Unique ID
</label>
</td>
<td>
<input type="text" placeholder="Enroll Number" required>
</form>
</td>
</tr>
<tr>
<td>
<tr>
<td>
<form>
<label>
Age
</label>
</td>
<td>
<input type="number" placeholder="Enter Student Age" required>
</form>
</td>
<td>
<form>
<label>
D.O.B
</label>
</td>
<td>
<input type="date" placeholder="Select DOB">
</form>
</td>
</tr>
<tr>
<td>
<form>
<label>
Gender
</label>
</td>
<td>
</form>
<label>
<input type="radio" name="G" value="Male">Male
<input type="radio" name="G" value="Female">Female
</label>
</td>
</tr>
<tr>
<td>
<form>
<label>
Mobile Number
</label>
</td>
<td>
</td>
</tr>
<tr>
<td>
<form>
<input type="submit">
</form>
</td>
</tr>
</table>
</body>
</html>
Images are not technically inserted into a web page; images are linked to
web pages. The <img> tag creates a holding space for the referenced image.
Tip: To link an
image to another
document,
simply nest
the <img> tag
inside
an <a> tag (see
example
below).Attribut
e
<img>\
<!DOCTYPE html>
<html>
<head>
<style>
img {
display: inline-block;
</style>
</head>
<body>
<p>Some text <img src="smiley.gif" alt="Smiley face" width="42" height="42"> some text.</p>
</body>
</html>
An article should make sense on its own and it should be possible to distribute it independently
from the rest of the site.
Potential sources for the <article> element:
Forum post
Blog post
News story
Note: The <article> element does not render as anything special in a browser. However, you can
use CSS to style the <article> element (see example below).
<!DOCTYPE html>
<html>
<head>
<style>
.all-browsers {
margin: 0;
padding: 5px;
background-color: lightgray;
margin: 10px;
padding: 5px;
.browser {
background: white;
}
.browser > h2, p {
margin: 4px;
font-size: 90%;
</style>
</head>
<body>
<article class="all-browsers">
<article class="browser">
<h2>Google Chrome</h2>
<p>Google Chrome is a web browser developed by Google, released in 2008. Chrome is the
world's most popular web browser today!</p>
</article>
<article class="browser">
<h2>Mozilla Firefox</h2>
<p>Mozilla Firefox is an open-source web browser developed by Mozilla. Firefox has been the
second most popular web browser since January, 2018.</p>
</article>
<article class="browser">
<h2>Microsoft Edge</h2>
<p>Microsoft Edge is a web browser developed by Microsoft, released in 2015. Microsoft Edge
replaced Internet Explorer.</p>
</article>
</article>
</body>
</html>
Table:
<!DOCTYPE html>
<html>
</html>
<title>
Day 4
</title>
<style>
table,td
border-style: groove;
background-color: aquamarine;
border-radius: 5px;
th{
color: blueviolet;
background-color: azure;
caption{
font-size: medium;
font-style: oblique;
color: crimson;
</style>
</head>
<body>
<table border=1>
<caption>
<b><big>
R.Harini
</big></b>
</caption>
<tr>
<th>Subject Name</th>
<th>Marks Scored</th>
</tr>
<tr>
<td>Tamil </td>
<td align=center>81</td>
</tr>
<tr>
<td>English</td>
<td align=center>94</td>
</tr>
<tr>
<td>Maths</td>
<td align=center>88</td>
</tr>
<tr>
<td>Science</td>
<td align=center>88</td>
</tr>
<tr>
<td>Social</td>
<td align=center>84</td>
</tr>
<tr>
<td>Total</td>
<td align=center>434</td>
</tr>
<tr>
<td>Result</td>
<td align=center>Pass</td>
</tr>
</table>
</body>
</html>
<!DOCTYPE html>
<html>
<body>
</body>
</html>
Output:
<!DOCTYPE html>
<html>
<body>
<hr>
<p>With CSS:</p>
<hr style="height:2px;border-width:0;color:gray;background-color:gray">
</body>
</html>
output:
With CSS:
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>
<style>
.myDiv {
background-color: lightblue;
text-align: center;
</style>
</head>
<body>
<div class="myDiv">
</div>
</body>
</html>
Output:
The required name attribute of the <map> element is associated with the <img>'s usemap attribute
and creates a relationship between the image and the map.
The <map> element contains a number of <area> elements, that defines the clickable areas in the
image map.
Program:
<!DOCTYPE html>
<html>
<body>
<map name="planetmap">
</map>
</body>
</html>
Output: