Professional Documents
Culture Documents
P.R.Joe Dhanith
Department of
CSE
HTML
• HTML is a language for describing web
pages.
• HTML stands
for Hyper Text Markup Language
• HTML is a markup language
• A markup language is a set of markup tags
• The tags describe document content
• HTML documents contain HTML tags and
plain text
• HTML documents are also called web pages
HTML TAGS
HTML markup tags are usually called HTML tags,
HTML tags are keywords (tag names) surrounded
by angle brackets like <html>
HTML tags normally come in pairs like <b> and
</b>
The first tag in a pair is the start tag, the second tag
is the end tag
The end tag is written like the start tag, with
a forward slash before the tag name
Start and end tags are also called opening
tags and closing tags
The HTML <head> Element
(eg)<!DOCTYPE html>
<html>
<body style="background-color:yellow;">
<h2 style="background-color:red;">This is a
heading</h2>
<p style="background-color:green;">This is a
paragraph.</p>
</body>
</html>
HTML Tables
<ul>
<li>Coffee</li>
<li>Milk</li>
</ul>
HTML Ordered Lists
<ol>
<li>Coffee</li>
<li>Milk</li>
</ol>
HTML Forms and Input
<form>
First name: <input type="text"
name="firstname"><br>
Last name: <input type="text"
name="lastname">
</form>
Radio Buttons
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Title of the document</title>
</head>
<body>
Content of the document......
</body>
</html>
HTML5 Semantic Elements
Semantic = Meaning.
Semantic elements = Elements with meaning.
A semantic element clearly describes its meaning
to both the browser and the developer.
Examples of non-semantic elements: <div> and
<span> - Tells nothing about its content.
Examples of semantic elements: <form>,
<table>, and <img> - Clearly defines its content.
New Semantic Elements in HTML5
<header>
<nav>
<section>
<article>
<aside>
<figure>
<figcaption>
<footer>
<details>
<summary>
<mark>
<time>
HTML5 <section> Element
<nav>
<a href="/html/">HTML</a> |
<a href="/css/">CSS</a> |
<a href="/js/">JavaScript</a> |
<a href="/jquery/">jQuery</a>
</nav>
HTML5 <aside> Element
<article>
<header>
<h1>Internet Explorer 9</h1>
<p><time pubdate datetime="2011-03-
15"></time></p>
</header>
<p>Windows Internet Explorer 9 (abbreviated as
IE9) was released to
the public on March 14, 2011 at 21:00 PDT.....</p>
</article>
HTML5 <footer> Element
<footer>
<p>Posted by: Hege Refsnes</p>
<p><time pubdate datetime="2012-03-
01"></time></p>
</footer>
HTML5 <figure> and <figcaption> Elements
HTML5
has several new input types for forms. These new features allow better
input control and validation.
color
date
datetime
datetime-local
email
month
number
range
search
tel
time
url
week
Input Type: color
Birthday:
<input type="date" name="bday">
Input Type: datetime
E-mail:
<input type="email" name="email">
Input Type: month
Search Google:
<input type="search" name="googlesearch">
Input Type: tel
Telephone:
<input type="tel" name="usrtel">
Input Type: time
Select a time:
<input type="time" name="usr_time">
Input Type: url
Select a week:
<input type="week" name="week_year">
HTML5 New Form Elements
<input list="browsers">
<datalist id="browsers">
<option value="Internet Explorer">
<option value="Firefox">
<option value="Chrome">
<option value="Opera">
<option value="Safari">
</datalist>
HTML5 <keygen> Element
autocomplete
novalidate
New attributes for <input>
autocomplete
autofocus
form
formaction
formenctype
formmethod
formnovalidate
formtarget
height and width
list
min and max
multiple
pattern (regexp)
placeholder
required
step
<form> / <input> autocomplete Attribute
<form action="demo_form.asp">
First name: <input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br>
<input type="submit" value="Submit"><br>
<input type="submit"
formaction="demo_admin.asp"
value="Submit as admin">
</form>
<input> formnovalidate Attribute
<form action="demo_form.asp">
E-mail: <input type="email"
name="userid"><br>
<input type="submit" value="Submit"><br>
<input type="submit" formnovalidate
value="Submit without validation">
</form>
<input> height and width Attributes
<input type="image"
src="img_submit.gif" alt="Submit"
width="48" height="48">
<input> list Attribute
<input list="browsers">
<datalist id="browsers">
<option value="Internet Explorer">
<option value="Firefox">
<option value="Chrome">
<option value="Opera">
<option value="Safari">
</datalist>
<input> min and max Attributes
<!DOCTYPE html>
<html>
<body>
</body>
</html>
HTML5 Video
<audio controls>
<source src="horse.ogg"
type="audio/ogg">
<source src="horse.mp3"
type="audio/mpeg">
Your browser does not support the audio
element.
</audio>
HTML - Plug-ins