WD PPT HTML Unit-2
WD PPT HTML Unit-2
Web Development
Unit-2
HTML
Outline
1. Introduction to HTML – List
• What is a Web Page? – Anchor
• My First HTML Page – Image
• HTML Code Formatting 3. HTML Tables
2. Basic HTML Tags 4. HTML Forms
• Heading 5. XHTML
• Paragraph 6. Introduction to HTML 5
• Color
• Font
What is a Web Page?
• Web page is text file containing HTML
• HTML – Hyper Text Markup Language
– A notation for describing
• document structure (semantic markup)
• formatting (presentation markup)
• The markup tags provide information about
the page content structure
Creating HTML Pages
• An HTML file must have an .htm or .html file
extension
• HTML files can be created with text editors:
– NotePad, NotePad ++, PSPad
• Or HTML editors (WYSIWYG Editors):
– Microsoft FrontPage
– Macromedia Dreamweaver
– Netscape Composer
– Visual Studio
First HTML Page
test.html
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
<p>This is some text...</p>
</body>
</html>
HTML Structure
• “elements” and “tags” are used in HTML
– Begins with <html> and ends with </html>
• Elements (tags) are nested one inside another:
<html> <head></head> <body></body> </html>
<!DOCTYPE HTML>
Opening tag
<html>
<head>
<title>My First HTML Page</title>
</head>
<body> Closing tag
<p>This is some text...</p>
</body>
</html>
An HTML element consists of an opening tag, a closing tag and the content inside.
First HTML Page: Header
HTML header
<!DOCTYPE HTML>
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
<p>This is some text...</p>
</body>
</html>
First HTML Page: Body
<!DOCTYPE HTML>
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
<p>This is some text...</p>
</body>
</html>
HTML body
First HTML Page
test.html
<!DOCTYPE HTML>
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
<p>This is some text...</p>
</body>
</html>
Basic HTML Tags
1. Headings
2. Paragraph
3. Colors
4. Fonts
5. List
6. Anchor Tag
7. Image
8. Table
9. Form
1) Headings
Headings are important because search engines use
the headings to index the structure and content of
your web pages.
author
description
name keywords Specifies a name for the metadata
robots
expires
content-type
Provides an HTTP header for the information/value of the
http-equiv default-style
content attribute
refresh
Gives the value associated with the http-equiv or name
content text
attribute
format/URI Not supported in HTML5. Specifies a scheme to be used to
scheme
USA/Europe interpret the value of the content attribute
Character Entities
• Character entities are used to display reserved characters in HTML.
• Characters that are not present on your keyboard can also be
replaced by entities.
Character Character Entity Description
Space
& & Ampersand
“ " Quote
< < Less than
> > Greater than
© © Copyright
® ® Registered
™ ™ Trademark
£ £ Pound
¢ ¢ Cent
÷ ÷ Divide
35
Keyboard and How Browser Works ?
Mouse
Output
To
HTML Interpreter Display
Controller Display
Plug-Ins/ Drivers
Other Interpreter
Response
from web
server
Other
Clients Network
HTTP Interface
Client Communicati
on with web
server
Introduction to HTML 5
• The DOCTYPE declaration for HTML5 is very simple:
<!DOCTYPE html>
• The character encoding (charset) declaration is also very
simple:
<meta charset="UTF-8">