HTML
HTML
• Style sheet languages- CSS & Extensible Stylesheet Language Family (XSL)
</html>
Header information
◦ <head> to begin, and </head> to end
◦ Gives information about the page that is not
displayed on the page itself
Page Title
◦ <title> to begin, and </title> to end
◦ Example: <title>Transcriptions
Studio</title>
<html>
<head>
<title>Transcriptions Studio</title>
</head>
</html>
Body Tags
◦ <body> and </body>
◦ *Note* that all text that appears on the page must
be encapsulated within the body tags
Text headings
◦ <h1> and </h1>
◦ There are six defined heading sizes
◦ <h1> (largest) through <h6> (smallest)
Paragraphs
◦ <p> and </p>
Headings
There are 6 heading commands.
</body>
</html>
<HTML>
<TITLE>Centre for Development of Advanced Computing </TITLE>
<BODY BGCOLOR=“#E7CCCC”>
...
...
<A
HREF=“mailto:[email protected]”>
webmaster</A>
</BODY>
</HTML>
This is a big heading!
This is a smaller heading!
Using both
◦ <font size=“+3” color=“red”>Hello</font>
◦ Output: Hello
List
◦ Code: ◦ Code:
<ul> <ol>
<li>Coffee</
li> <li>Milk</li> <li>Coffee</li>
</ul> <li>Milk</li>
</ol>
◦ Output:
Coffee ◦ Output:
Milk 1. Coffee
2. Milk
Table
<table border=“1">
<tr>
<th>Heading</th>
<th>Another
Heading</th>
</tr> Heading Another Heading
<tr> Row 1, cell 1 Row 1, cell 2
<td>row 1, cell 1</td>
Row 2, cell 1
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td></td>
</tr>
</table>
<html>
<body background=“c:\cloud.gif”> Table
<table border=“1">
<tr align=center>
<th
rowspan=2>Name</th>
<th colspan=2>Marks</th>
</tr>
<tr align=center>
<th>C Language</th>
<th>English</th> Name Marks
</tr>
<tr align=center> C Language English
<td>amit</td>
amit 90 95
<td>90</td>
<td>95</td> sumit 95 96
</tr>
<tr align=center>
<td>sumit</td>
<td>95</td>
<td>96</td>
</tr>
</table>
Create Links
A Hypertext link
◦ <a href=“http://www.birlainstitute.co.in”>BIAS Institute</a>
◦ Output: BIAS Institute
A Email link
◦ <a href=mailto:[email protected]>Email me</a>
◦ Output: Email me
Image Formats
.gif
◦ Graphics Interchange Format
.jpeg or .jpg
◦ Joint Photographic Experts Group
.bmp
◦ bitmap
Inserting Image
Place all images in the same directory/folder
where you web pages are
<img src=“image.gif”>
Height
Width
Forms
A form is an area that can contain form
elements.
<form></form>
<form>
First name: <input type="text"
name="firstname">
<br>
Last name: <input type="text"
name="lastname"> </form>
Output
First name:
Last name:
Checkboxes
Used when you want the user to select one or more
options of a limited number of choices.
<form>
<input type="checkbox" name="bike“ value=“bike”>
I have a bike
<br>
<input type="checkbox" name="car“ value=“car”>
I have a car
</form>
Output
<form>
<input type="radio" name="sex" value="male">
Male
<br>
<input type="radio" name="sex" value="female">
Female
</form>
Radio buttons, however,
operate as a group and provide Output
mutually exclusive selection
values. A user can select only Male
one option in a radio button Female
group.
Text Box
Used when you want to get input from user.
<form>
<p>Please provide your suggestion in the text box
below:</p>
<textarea row=“10” cols=“30”>
</textarea>
</form> Output
Please provide your
suggestion in the text box
below:
Pull-down Menu
Used when you want user to respond with one
specific answer with choices you given.
<p>Select a fruit:</p>
<select name="Fruit">
<option selected> Apples
<option> Bananas
<option > Oranges
</select> Output
Select a fruit:
Submission Button
When user clicks on the “Submit” button, the content of
the form is sent to another file.
Username:
Comments
◦ Comments are notes in your HTML file
</body>
</html>
Example:
<frame src="home.html" name="main" frameborder="0"/>
Scrolling frames
◦ The scrolling attribute to the <frame> tag controls
whether the scrollbar appears
Example:
<frame src= "ex.html" name= "ex" frameborder="0" scrolling="no"/>
<A NAME=“Location_Name”>
The World Wide Web Consortium (W3C) is an international community where Member
organizations, a full-time staff, and the public work together to develop Web standards.
Placeholder text
Specific text input: email, URL, number,
search
Slider
Date picker
User Agent validation
<!DOCTYPE HTML>
<html>
<body>
</body>
</html>
<!DOCTYPE HTML>
<html>
<body>
</body>
</html> If this attribute is present, the browser will offer
controls to allow the user to control audio
playback, including volume, seeking, and
pause/resume playback.
The email type is used for input fields that should
contain an e-mail address.
If so, then why was the waiter not disturbed? He handled it near to perfection, without any chaos.
It is not the cockroach, but the inability of those people to handle the disturbance caused by the
cockroach, that disturbed the ladies. I realized that, it is not the shouting of my father or my boss or
my wife that disturbs me, but it's my inability to handle the disturbances caused by their shouting
that disturbs me.
It's not the traffic jams on the road that disturbs me, but my inability to handle the disturbance caused
by the traffic jam that disturbs me.
More than the problem, it's my reaction to the problem that creates chaos in my life.
Lessons learnt from the story:
I understood, I should not react in life.I should always respond. The women reacted, whereas the waiter
responded. Reactions are always instinctive whereas responses are always well thought of. A
beautiful way to understand............LIFE. Person who is HAPPY is not because Everything is RIGHT in
his Life..
He is HAPPY because his Attitude towards Everything in his Life is Right..!!,,,,,,,
A website is a collection of publicly accessible,
interlinked Web pages that share a single domain
name. Websites can be created and maintained by
an individual, group, business or organization to
serve a variety of purposes.
Web Page:
A document which can be displayed in a
web browser such as Firefox, Google
Chrome, Opera, Microsoft Internet Explorer
or Edge, or Apple's Safari. These are also
The purpose of a web browser (Chrome,
Edge, Firefox, Safari) is to read HTML
documents and display them correctly.
A browser does not display the HTML tags,
but uses them to determine how to display
the document:
Google Chrome
Internet Explorer
Firefox
Safari
Edge
A static website contains Web pages with
fixed content. Each page is coded in HTML
and displays the same information to every
visitor.
Dynamic website contain web pages that are
generated in real-time.
HTML is an acronym which stands for Hyper Text Markup
applications.
Hyper Text: Hyper Text simply means “Text within Text”. A text
document.
Developed by Tim Berners-Lee in 1991
Web Page Layout Language
Hyperlink Specification Language
Markup Language
We can create a static website by HTML only
Word Processing Tool
Programming Language
Sublime
Notepad
Text
Open Notepad
Type the required codes
Save the file with .html or .htm extension
Open the browser window
Go to File
Click Open
Select the location where the file is placed
Select the File
Click Open
The HTML page will open up
There is no need to be connected to the internet
Tag Formatting i.e.
how a web page will appear?
<h1>Uttarakhand Open
University</h1>
<p>My first Paragraph</p>
</body>
</html>
• The <!DOCTYPE html> declaration defines that this
document is an HTML5 document
• The <html> element is the root element of an HTML
page
• The <head> element contains meta information
about the HTML page
• The <title> element specifies a title for the HTML
page (which is shown in the browser's title bar or in
the page's tab)
• The <body> element defines the document's body,
and is a container for all the visible contents, such as
headings, paragraphs, images, hyperlinks, tables,
lists, etc.
• The <h1> element defines a large heading.
• The <p> element defines a paragraph.
An HTML element is defined by a start tag, some
content, and an end tag:
<tagname>Content goes here...</tagname>
<tagname style="property:value;">
The property is a CSS property. The value is a
CSS value.
The CSS background-color property defines the
background color for an HTML element.
<!DOCTYPE html>
<html>
<body style="background-color:red;">
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
The CSS font-family property defines the font to
be used for an HTML element:
<!DOCTYPE html>
<html>
<body>
<h1 style="font-family:verdana;">UOU</h1>
<p style="font-family:courier;">Uttarakhand
Open University</p>
</body>
</html>
HTML contains several elements for defining text with a special
meaning.
HTML Formatting Elements
Formatting elements were designed to display special types of
text:
•<b> - Bold text
•<i> - Italic text
•<small> - Smaller text
•<sub> - Subscript text
•<sup> - Superscript text
•<strong> - Important text
•<em> - Emphasized text
HTML links are hyperlinks.
You can click on a link and jump to another
document.
When you move the mouse over a link, the
mouse arrow will turn into a little hand.
The HTML <a> tag defines a hyperlink. It has the
following syntax:
<a href="url">link text</a>
The most important attribute of the <a> element is
the href attribute, which indicates the link's destination.
The link text is the part that will be visible to the reader.
Clicking on the link text, will send the reader to the specified
URL address.
<!DOCTYPE html>
<html>
<body
<h1>HTML Links</h1>
<p><a href="https://www.w3schools.com/">Visit
W3Schools.com!</a></p>
</body>
</html>
By default, the linked page will be displayed in the
current browser window. To change this, you must specify
another target for the link.
The target attribute specifies where to open the linked
document.
The target attribute can have one of the following values:
•_self - Default. Opens the document in the same
window/tab as it was clicked
•_blank - Opens the document in a new window or tab
•_parent - Opens the document in the parent frame
•_top - Opens the document in the full body of the window
Images can improve the design and the appearance of a web page.
The HTML <img> tag is used to embed an image in a web page.
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.
The <img> tag is empty, it contains attributes only, and does not
have a closing tag.
The <img> tag has two required attributes:
•src - Specifies the path to the image
•alt - Specifies an alternate text for the image
HTML tables allow web developers to arrange data into
rows and columns.
Define an HTML Table
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.
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 instead of
the <td> tag:
HTML lists allow web developers to group a set of
related items in lists.