HTML Unit Ii
HTML Unit Ii
Prepared By:
Swati Chawla
Asst Professor
MERI
HTML
HTML is a computer language devised to allow
website creation.
Web pages are text files containing HTML
HTML – Hyper Text Markup Language
The markup tags provide information about the page
content structure
An HTML file must have an .htm or .html file
extension
HTML files can be created with text editor like
NotePad
HTML Basics
Text, Images, Tables, Forms
Basic HTML
Every HTML document has the following two
sections:
Head
Body
The head begins with <HEAD> tag and ends with the
</HEAD> tag.
In the head section, the title is the most important
item. The title begins from <TITLE> and ends with
</TITLE>.
The body begins with <BODY> and ends with
</BODY>.
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
<p>This is some text...</p>
</body>
</html>
<html> Opening tag
<head>
<title>My First HTML Page</title>
</head>
<body>
<p>This is some text...</p>
Closing
tag
</body>
</html>
An HTML element consists of an opening tag, a closing tag and the content
inside.
HTML
header
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
<p>This is some text...</p>
</body>
</html>
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
<p>This is some text...</p>
</body>
</html> HTML body
Headlines can be created with tags H1, H2, H3……
<h1>Welcome to HTML</h1>
<br> Line break (to start next line)
<p> Starts a new paragraph
<b> </b> bold
<u> </u> underline
<I> </I> Italics
<ol> </ol> ordered list
<ul> </ul> Unordered list
<li> </li> A list item
The HTML <hr> element represents a thematic
break between paragraph-level elements (for example,
a change of scene in a story, or a shift of topic with a
section)(line drawn).
<body bgcolor="darkred" text="white">
for background
<p align=left> Text </p>
<p align=right> Text </p>
<p align="left|right|center|justify">
<strike> TEXT </strike>
<sub> college </sub>
<sup> college </sup>
<big> meri college </big>
<small> meri college </small>
<img src="Chrysanthemum.jpg"
<oL start=3>
<LI>B.SC COMPUTER
<LI>M.SC COMPUTER SCIENCE
<LI> PGDCA
</oL>
<html>
<head>
<title>college</title>
</head>
<body>
<h1>meri college</h1>
<hr>
<br>
Meri college is a famous college.This was
inograted by .It is in
sagarpur,janakPuri.Janakpuri is famous for its
district centre market.It provides
mba,mca,bba,btech and pgdm courses.
</body>
</html>
<html>
<head>
<title>
background testing
</title>
</head>
<body bgcolor="darkred" text="white">
<h1> MERI COLLEGE </H1>
</body>
</html>
<html>
<head>
<title>
background testing
</title>
</head>
<body bgcolor="darkred " text="white">
<p align=left>mathematial design,anlysis and
implementation of traffic information system for
tirunelveli city bus service is a project which
has been undertaken by the computer sience
research lanorartory.</p>
<p align=right>mathematial design,anlysis and
implementation of traffic information system for
tirunelveli city bus service is a project which
has been undertaken by the computer sience
research lanorartory.</p>
<h1> MERI COLLEGE </H1>
</body>
</html>
<html>
<head>
<title>
<physical styles format>
</title>
</head>
<body>
<br> <b> MERI COLLEGE </b>
<br> <i> MERI COLLEGE </i>
<br> <u> MERI COLLEGE </U>
<br> <strike> MERI COLLEGE </strike>
<br> meri <sub> college </sub>
<br> meri <sup> college </sup>
<br> <big> meri college </big>
<br> <small> meri college </small>
</body>
</html>
<html>
<head>
<title> flower</title>
</head>
<body>
<h1> flower </h1>
<hr size=3>
<img src="Chrysanthemum.jpg" align="right"
width="300" height="175">
</body>
</html>
<html>
<head>
<title> unordered list </title>
<h1>
the department of computer science offer the
following course:
</h1>
<h6>FULL-TIME</h6>
<UL type= square>
<LI>b.sc computer science
<LI>m.c.a
</ul>
<h6>EVENING COURSES</H6>
<UL type=cricle>
<LI>B.SC COMPUTER
<LI>M.SC COMPUTER SCIENCE
<LI> PGDCA
</UL>
<H6>WEEK-END PROGRAMMES</H6>
<UL type=disc>
<LI>M.PHIL.
<LI>PH.D.
</UL>
</head>
</htmL>
<html>
<head>
<title> ordered list </title>
<h1>
the department of computer science offer the
following course:
</h1>
<oL>
<LI>b.sc computer science
<LI>m.c.a
</ol>
<h2>EVENING COURSES</h2>
<oL start=3>
<LI>B.SC COMPUTER
<LI>M.SC COMPUTER SCIENCE
<LI> PGDCA
</oL>
<H2>WEEK-END PROGRAMMES</H2>
<oL start=6>
<LI>M.PHIL.
<LI>PH.D.
</oL>
</head>
</htmL>
<html>
<head>
<title>table handling</title>
</head>
<body>
<table border=5>
<caption> admission 2013-2014 </caption>
<tr><th>course<the>OC<th>BC<th>MBC<th>SC/ST<th>total
<tr><td> computer science
<td>9<td>18<td>5<td>5<td>37
<tr> <td>commerce<td>14<td>25<td>6<td>5<td>50
<tr><td>mathematics<td>14<td>20<td>4<td>4<td>40
<tr><td>physics<td>11<td>19<td>5<td>4<td>40
<tr><td>chemistr<td>13<td>18<td>5<td>5<td>40
</table>
</body>
</html>
An HTML marquee is a scrolling piece of text displayed
either horizontally across or vertically down your
webpage depending on the settings. This is created by
using HTML <marquees> tag.
<html>
<head>
<title>HTML marquee Tag</title>
</head>
<body>
<marquee>This is basic example of marquee</marquee>
</body>
</html>
<html>
<head>
<title>HTML marquee Tag</title>
</head>
<body>
<marquee direction="right">This text will scroll from
left to right</marquee>
</body>
</html>
<html>
<head>
<title>HTML marquee Tag</title>
</head>
<body>
<marquee direction="up">This text will scroll from
bottom to up</marquee>
</body>
</html>