SlideShare a Scribd company logo
1 of 51
The
World Wide Web
The Internet is an immense network of networks, and the World
Wide Web is the part of the Internet that is based on hypertext. The
Web is made up of Web sites, each consisting of one or more Web
pages that are linked together.
Web Page
• A web page or webpage is a resource of information that is suitable
for the World Wide Web and can be accessed through a web
browser. This information is usually in HTML or XHTML format, and
may provide navigation to other web pages via hypertext links.
Web pages are requested and served from web servers using
Hypertext Transfer Protocol (HTTP).
• Web pages may consist of files of static text stored within the web
server's file system (static web pages), or the web server may
construct the (X)HTML for each web page when it is requested by a
browser (dynamic web pages). Client-side scripting can make web
pages more responsive to user input once in the client browser.
Website
• A website (alternatively, web site or Web site, from the
proper noun World Wide Web) is a collection of Web pages,
images, videos or other digital assets that is hosted on one or
more web servers, usually accessible via the Internet.
• The pages of websites can usually be accessed from a
common root URL called the homepage, and usually reside on
the same physical server. The URLs of the pages organize
them into a hierarchy, although the hyperlinks between them
control how the reader perceives the overall structure and
how the traffic flows between the different parts of the sites.
Web Page Design
• Web page design is a process of conceptualization, planning,
modeling, and execution of electronic media content delivery via
Internet in the form of technologies (such as markup languages)
suitable for interpretation and display by a web browser or other
web-based graphical user interfaces (GUIs).
• The intent of web design is to create a web site that presents
content (including interactive features or interfaces) to the end
user in the form of web pages once requested. Such elements as
text, forms, and bit-mapped images (GIFs, JPEGs, PNGs) can be
placed on the page using HTML, XHTML, or XML tags. Displaying
more complex media (vector graphics, animations, videos, sounds)
usually requires plug-ins such as Flash, QuickTime, Java run-time
environment, etc. Plug-ins are also embedded into web pages by
using HTML or XHTML tags.
Design Concepts
• Designing a web site is defined as the arrangement and creation of web
pages that in turn make up a web site. A web page consists of information
for which the web site is developed. A web site might be compared to a
book, where each page of the book is a web page.
• There are many aspects (design concerns) in this process, and due to the
rapid development of the Internet, new aspects may emerge. For non-
commercial web sites, the goals may vary depending on the desired
exposure and response. For typical commercial web sites, the basic
aspects of design are:
• Content: the substance, and information on the site should be relevant to the
site and should target the area of the public that the website is concerned
with.
• Usability: the site should be user-friendly, with the interface and navigation
simple and reliable.
• Appearance: the graphics and text should include a single style that flows
throughout, to show consistency. The style should be professional, appealing
and relevant.
• Visibility: the site must also be easy to find via most, if not all, major search
engines and advertisement media.
Introduction to HTML
What is HTML?
• HTML is a language for describing web pages.
• HTML stands for Hyper Text Markup Language
• HTML is not a programming language, it is a markup language
• A markup language is a set of markup tags
• HTML uses markup tags to describe web pages
HTML Tags
HTML markup tags are usually called HTML tags
• HTML tags are keywords 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
• Start and end tags are also called opening tags and
closing tags
HTML Documents = Web Pages
• HTML documents describe web pages
• HTML documents contain HTML tags and plain text
• HTML documents are also called web pages
The purpose of a web browser (like Internet Explorer or Firefox) is
to read HTML documents and display them as web pages. The
browser does not display the HTML tags, but uses the tags to
interpret the content of the page:
• The text between <html> and </html> describes the web
page
• The text between <body> and </body> is the visible page
content
• The text between <h1> and </h1> is displayed as a heading
• The text between <p> and </p> is displayed as a paragraph
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph</p>
</body>
</html>
HTML - Getting Started
Editing HTML
• In this tutorial we use a plain text editor (like Notepad) to edit
HTML. We believe this is the best way to learn HTML.
• However, professional web developers often prefer HTML
editors like FrontPage or Dreamweaver, instead of writing
plain text.
HTM or HTML Extension?
When you save an HTML file, you can use either the .htm or
the .html extension. We use .htm in our examples. It is a habit
from the past, when the software only allowed three letters in
file extensions.
HTML Elements
• An HTML element is everything from the start tag to the end
tag:
Start tag * Element content End tag *
<p> This is a paragraph </p>
<a href="default.htm" > This is a link </a>
<br />
:
HTML Element Syntax
• An HTML element is everything from the start tag to the end
tag:
• An HTML element ends with an end tag / closing tag
• The element content is everything between the start and the
end tag
• Most HTML elements can have attributes
HTML Document Example
The example above contains 3 HTML elements.
<html>
<body>
<p>This is my first paragraph</p>
</body>
</html>
The Paragrahp <p> element:
The <p> element defines a paragraph in the HTML document
The element has a start tag <p> and an end tag </p>
The element content is: This is my first paragraph
The Body <body> element:
The <body> element defines the body of the HTML document
The element has a start tag <body> and an end tag </body>
The element content is another HTML element (a paragraph)
The HTML <html> element:
The <html> element defines the whole HTML document.
The element has a start tag <html> and an end tag </html>
The element content is another HTML element (the body)
Don't Forget the End Tag
Most browsers will display HTML correctly even if you forget the
end tag:
Empty HTML Elements
•HTML elements without content are called empty elements.
Empty elements can be closed in the start tag.
• <br> is an empty element without a closing tag (it defines a line
break).
•In XHTML, XML, and future versions of HTML, all elements must
be closed.
•Adding a slash to the start tag, like <br />, is the proper way of
closing empty elements, accepted by HTML, XHTML and XML.
•Even if <br> works in all browsers, writing <br /> instead is
more future proof.
Use of Lowercase Tags
• HTML tags are not case sensitive: <P> means the same as <p>.
Plenty of web sites use uppercase HTML tags in their pages.
Attributes
HTML Attributes
• HTML elements can have attributes
• Attributes provide additional information about the element
• Attributes are always specified in the start tag
• Attributes come in name/value pairs like: name="value"
Attribute Example
• HTML links are defined with the <a> tag. The link address is
provided as an attribute:
<a href="http://www.mfi.org.ph">This is an MFI Web site
link</a>
Headings
HTML Headings
• Headings are defined with the <h1> to <h6> tags.
• <h1> defines the largest heading. <h6> defines the smallest
heading.
<h1>This is a heading</h1>
<h2>This is a heading</h2>
<h3>This is a heading</h3>
Headings Are Important
• Use HTML headings for headings only. Don't use headings to
make text BIG or bold.
• Search engines use your headings to index the structure and
content of your web pages.
• Since users may skim your pages by its headings, it is
important to use headings to show the document structure.
• H1 headings should be used as main headings, followed by H2
headings, then less important H3 headings, and so on.
HTML Rules (Lines)
The <hr /> tag is used to create an horizontal rule (line).
<p>This is a paragraph</p>
<hr />
<p>This is a paragraph</p>
<hr />
<p>This is a paragraph</p>
HTML Comments
Comments can be inserted in the HTML code to make it more
readable and understandable. Comments are ignored by the
browser and are not displayed.
<!-- This is a comment -->
Note: There is an exclamation point after the opening bracket, but not before the closing bracket.
<html>
<body>
<!--This is not a rugular paragraph-->
<p>This is a regular paragraph</p>
</body>
</html>
This is a regular paragraph
Example
Code Result
HTML Tag Reference
Tag Description
<html> Defines an HTML document
<body> Defines the document's body
<h1> to <h6> Defines header 1 to header 6
<hr /> Defines a horizontal rule
<!--> Defines a comment
HTML Paragraphs
Paragraphs are defined with the <p> tag.
<p>This is a paragraph</p>
<p>This is another paragraph</p>
Note: Browsers automatically add an empty line before and after paragraphs.
Don't Forget the End Tag
HTML Line Breaks
Use the <br /> tag if you want a line break (a new line) without
starting a new paragraph:
The <br /> element is an empty HTML element. It has no end tag.
<br> or <br />
• In XHTML, XML, and future versions of HTML, HTML elements
with no end tag (closing tag) are not allowed.
• Even if <br> works in all browsers, writing <br /> instead is
more future proof.
<html>
<body>
<p>This is<br />a para<br />graph with line
breaks</p>
</body>
</html>
This is
a para
graph with line breaks
Example
Code Result
Tag Reference
Tag Description
<p> Defines a paragraph
<br /> Inserts a single line break
HTML Text Formatting
<html>
<body>
<p><b>This text is bold</b></p>
<p><big>This text is big</big></p>
<p><i>This text is italic</i></p>
<p><code>This is computer
output</code></p>
<p>This is<sub> subscript</sub> and
<sup>superscript</sup></p>
</body>
</html>
This text is bold
This text is big
This text is italic
This is computer output
This is subscript
and superscript
Example
Code Result
Tag Description
<b> Defines bold text
<big> Defines big text
<em> Defines emphasized text
<i> Defines italic text
<small> Defines small text
<strong> Defines strong text
<sub> Defines subscripted text
<sup> Defines superscripted text
<ins> Defines inserted text
<del> Defines deleted text
Text Formatting Tags
HTML Styles
Look! Styles and colors
This text is in Verdana and red
This text is in Times and blue
This text is 30 pixels high
The HTML Style Attribute
The purpose of the style attribute is:
To provide a common way to style all HTML elements.
With HTML styles, styles can be added to HTML elements
directly by using the style attribute, or indirectly in separate
style sheets (CSS files).
HTML Style Examples
• style="background-color:yellow"
• style="font-size:10px"
• style="font-family:Times"
• style="text-align:center“
Background Color
<body style="background-color:yellow">
Font Family, Color and Size
<p style="font-family:courier new; color:red; font-size:20px">
Text Alignment
<h1 style="text-align:center">
HTML Links
Hyperlinks, Anchors, and Links
• In web terms, a hyperlink is a reference (an address) to a
resource on the web.
• Hyperlinks can point to any resource on the web: an HTML
page, an image, a sound file, a movie, etc.
• An anchor is a term used to define a hyperlink destination
inside a document.
The HTML anchor element <a>, is used to define both hyperlinks
and anchors.
We will use the term HTML link when the <a> element points to a
resource, and the term HTML anchor when the <a> elements
defines an address inside a document..
HTML Link
The href Attribute
• The href attribute defines the link "address".
• This <a> element defines a link to MFI Foundation:
<a href="http://www.mfi.org.ph/">Visit MFI Foundation!</a>
The code above will display like this in a browser:
Visit MFI Foudation!
<html>
<body style="background-color:PowderBlue;">
<h1>Look! Styles and colors</h1>
<p style="font-family:verdana;color:red">
This text is in Verdana and red</p>
<p style="font-family:times;color:green">
This text is in Times and green</p>
<p style="font-size:30px">This text is 30 pixels
high</p>
</body>
</html>
Look! Styles and colors
This text is in Verdana and red
This text is in Times and green
This text is 30 pixels high
Example
Code Result
Image as Link
<html>
<body>
<p>Create a link of an image:
<a href="http://www.mfi.org.ph">
<img src="smiley.gif" alt="MFI website"
width="32" height="32" />
</a></p>
<p>No border around the image, but still a
link:
<a href="http://edge.mfi.org.ph/edge2">
<img border="0" src="smiley.gif" alt="MFI
Web Site" width="32" height="32" />
</a></p>
</body>
</html>
Create a link of an
No border around the image, but still a
Example
Code Result
Link to a location on the same Page
Example
Code Result
<html>
<body>
<p>
<a href="#C6">See also Chapter 4.</a>
</p>
<h2>Chapter 1</h2>
<p>This chapter explains ba bla bla</p>
<h2>Chapter 2</h2>
<p>This chapter explains ba bla bla</p>
<h2>Chapter 3</h2>
<p>This chapter explains ba bla bla</p>
<h2Chapter 4</a></h2>
<p>This chapter explains ba bla bla</p>
<h2>Chapter 5</h2>
<p>This chapter explains ba bla bla</p>
<h2> ><a name=“C6“>Chapter 6</h2>
<p>This chapter explains ba bla bla</p>
</body>
</html>
See also Chapter 6
Chapter 1
This chapter explains ba bla bla
Chapter 2
This chapter explains ba bla bla
Chapter 3
This chapter explains ba bla bla
Chapter 4
This chapter explains ba bla bla
Chapter 5
This chapter explains ba bla bla
Chapter 6
This chapter explains ba bla bla
Images
The Image Tag and the Src Attribute
In HTML, images are defined with the <img> tag.
The <img> tag is empty, which means that it contains
attributes only and it has no closing tag.
To display an image on a page, you need to use the src
attribute. Src stands for "source". The value of the src
attribute is the URL of the image you want to display on your
page.
<img src="url" />
The URL points to the location where the image is stored.
The Alt Attribute
The alt attribute is used to define an "alternate text" for an
image. The value of the alt attribute is an author-defined text:
<img src="boat.gif" alt="Big Boat" />
The "alt" attribute tells the reader what he or she is missing
on a page if the browser can't load images. The browser will
then display the alternate text instead of the image.
<html>
<body background="bg.jpg">
<h3>Look: A background image!</h3>
<p>Both gif and jpg files can be used as
HTML backgrounds.</p>
<p>If the image is smaller than the page, the
image will repeat itself.</p>
</body>
</html>
Look: A background image!
Both gif and jpg files can be used as
HTML backgrounds.
If the image is smaller than the page, the
image will repeat itself.
Example
Code Result
<html>
<body>
<p>An image
<img src=“smiley.gif" align="bottom" width="48" height="48" />
in the text.</p>
<p>An image
<img src=“smiley.gif" align="middle" width="48" height="48" />
in the text.</p>
<p>An image
<img src=“smiley.gif" align="top" width="48" height="48"/>
in the text.</p>
<p><b>Note:</b> The bottom alignment is the default!</p>
<p>An image
<img src=“smiley.gif" width="48" height="48" />
in the text.</p>
<p><img src=“smiley.gif" width="48" height="48" />
An image before the text.</p>
<p>An image after the text.
<img src=“smiley.gif" width="48" height="48" /></p>
</body>
</html>
Code
An image in the text.
An image in the text.
An image in the text.
Note: The bottom alignment is the default!
An image in the text.
An image before the text.
An image after the text.
Result
<html>
<body>
<p>Click on the sun or on one of the planets to
watch it closer:</p>
<img src="planets.gif" width="145" height="126"
alt="Planets" usemap="#planetmap" />
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" alt="Sun"
href="sun.htm" />
<area shape="circle" coords="90,58,3"
alt="Mercury" href="mercur.htm" />
<area shape="circle" coords="124,58,8"
alt="Venus" href="venus.htm" />
</map>
</body>
</html>
Tables
Tables are defined with the <table> tag. A table is divided into
rows (with the <tr> tag), and each row is divided into data
cells (with the <td> tag). The letters td stands for "table data,"
which is the content of a data cell. A data cell can contain
text, images, lists, paragraphs, forms, horizontal rules, tables,
etc.
<table border="1">
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>
row 1, cell 1 row 1, cell 2
row 2, cell 1 row 2, cell 2
Headings in a Table
<table border="1">
<tr>
<th>Heading</th>
<th>Another Heading</th>
</tr>
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>
Heading Another Heading
row 1, cell 1 row 1, cell 2
row 2, cell 1 row 2, cell 2
Example
Code Result
<html>
<body>
<h4>Cell that spans two columns:</h4>
<table border="1">
<tr>
<th>Name</th>
<th colspan="2">Telephone</th> </tr>
<tr>
<td>Bill Gates</td>
<td>555 77 854</td>
<td>555 77 855</td> </tr>
</table>
<h4>Cell that spans two rows:</h4>
<table border="1">
<tr>
<th>First Name:</th>
<td>Bill Gates</td> </tr>
<tr>
<th rowspan="2">Telephone:</th>
<td>555 77 854</td> </tr>
<tr>
<td>555 77 855</td> </tr>
</table>
</body>
</html>
Name Telephone
Bill Gates 555 77 854 555 77 855
First Name: Bill Gates
Telephone:
555 77 854
555 77 855
Cell that spans two columns:
Cell that spans two rows:
Lists
HTML supports ordered, unordered and definition lists.
Unordered Lists
An unordered list is a list of items. The list items are marked with
bullets (typically small black circles).
An unordered list starts with the <ul> tag. Each list item starts with
the <li> tag.
Here is how it looks in a browser:
• Coffee
• Milk
Inside a list item you can put paragraphs, line breaks, images, links,
other lists, etc.
Ordered Lists
An ordered list is also a list of items. The list items are marked
with numbers.
An ordered list starts with the <ol> tag. Each list item starts
with the <li> tag.
Here is how it looks in a browser:
1. Coffee
2. Milk
Inside a list item you can put paragraphs, line breaks, images,
links, other lists, etc.
Definition Lists
A definition list is not a list of single items. It is a list of items
(terms), with a description of each item (term).
A definition list starts with a <dl> tag (definition list).
Each term starts with a <dt> tag (definition term).
Each description starts with a <dd> tag (definition
description).
Here is how it looks in a browser:
Coffee
Black hot drink
Milk
White cold drink
Inside the <dd> tag you can put paragraphs, line breaks, images,
links, other lists, etc.
<ul>
<li>Coffee</li>
<li>Milk</li>
</ul>
Unordered Lists
<ol>
<li>Coffee</li>
<li>Milk</li>
</ol>
Ordered Lists
Definition Lists
<dl>
<dt>Coffee</dt>
<dd>Black hot drink</dd>
<dt>Milk</dt>
<dd>White cold drink</dd>
</dl>
Nested List
<html>
<body>
<h4>A nested List:</h4>
<ul>
<li>Coffee</li>
<li>Tea
<ul>
<li>Black tea</li>
<li>Green tea</li>
</ul>
</li>
<li>Milk</li>
</ul>
</body>
</html>
A nested List:
•Coffee
•Tea
oBlack tea
oGreen tea
•Milk
Forms and Input
Forms are used to select different kinds of user input.
A form is an area that can contain form elements.
Form elements are elements that allow the user to enter
information (like text fields, textarea fields, drop-down menus,
radio buttons, checkboxes, etc.) in a form.
A form is defined with the <form> tag.
Input
The most used form tag is the <input> tag. The type of input is
specified with the type attribute.
Text Fields
Text fields are used when you want the user to type letters,
numbers, etc. in a form.
<form>
First name:
<input type="text" name="firstname" />
<br />
Last name:
<input type="text" name="lastname" />
</form>
How it looks in a browser:
First name:
Last name:
Note that the form itself is not visible. Also note that in most browsers, the width of
the text field is 20 characters by default.
Radio Buttons
Radio Buttons are used when you want the user to select one
of a limited number of choices.
<form>
<input type="radio" name="sex"
value="male" /> Male
<br />
<input type="radio" name="sex"
value="female" /> Female
</form>
How it looks in a browser:
Male
Female
Note that only one option can be chosen.
Checkboxes
Checkboxes are used when you want the user to select one or
more options of a limited number of choices.
<form>
I have a motorcycle:
<input type="checkbox" name="vehicle"
value="Bike" />
<br />
I have a bicycle:
<input type="checkbox" name="vehicle"
value="Car" />
<br />
I have a car:
<input type="checkbox" name="vehicle"
value="Airplane" />
</form>
How it looks in a browser:
I have a motorcycle:
I have a bicycle:
I have an car:
The Form's Action Attribute and the Submit Button
When the user clicks on the "Submit" button, the content of
the form is sent to the server. The form's action attribute
defines the name of the file to send the content to. The file
defined in the action attribute usually does something with
the received input.
<form name="input" action="html_form_submit.asp" method="get">
Username:
<input type="text" name="user" />
<input type="submit" value="Submit" />
</form>
How it looks in a browser
Username: Submit

More Related Content

What's hot

Introduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSIntroduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSJussi Pohjolainen
 
Html (hypertext markup language)
Html (hypertext markup language)Html (hypertext markup language)
Html (hypertext markup language)Resty Jay Galdo
 
Lecture 2 introduction to html basics
Lecture 2 introduction to html basicsLecture 2 introduction to html basics
Lecture 2 introduction to html basicsAliMUSSA3
 
Introduction to Web Technology
Introduction to Web TechnologyIntroduction to Web Technology
Introduction to Web TechnologyRob Bertholf
 
Unit 4 - HTTP and the Web Services - IT
Unit 4 - HTTP and the Web Services - ITUnit 4 - HTTP and the Web Services - IT
Unit 4 - HTTP and the Web Services - ITDeepraj Bhujel
 
Internet programming notes
Internet programming notesInternet programming notes
Internet programming notesDurgadevi palani
 
Html for beginners part I
Html for beginners part IHtml for beginners part I
Html for beginners part IUnaib Aslam
 
Web I - 02 - XHTML Introduction
Web I - 02 - XHTML IntroductionWeb I - 02 - XHTML Introduction
Web I - 02 - XHTML IntroductionRandy Connolly
 
Protocols and standards (http , html, xhtml, cgi, xml, wml, c html, etc)
Protocols and standards (http , html, xhtml, cgi, xml, wml, c html, etc)Protocols and standards (http , html, xhtml, cgi, xml, wml, c html, etc)
Protocols and standards (http , html, xhtml, cgi, xml, wml, c html, etc)techlovers3
 
How the Web Works Using HTML
How the Web Works Using HTMLHow the Web Works Using HTML
How the Web Works Using HTMLMarlon Jamera
 

What's hot (20)

Introduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSIntroduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSS
 
Design Tools Html Xhtml
Design Tools Html XhtmlDesign Tools Html Xhtml
Design Tools Html Xhtml
 
Unit 2 (html)
Unit 2  (html)Unit 2  (html)
Unit 2 (html)
 
Html (hypertext markup language)
Html (hypertext markup language)Html (hypertext markup language)
Html (hypertext markup language)
 
Lecture 2 introduction to html basics
Lecture 2 introduction to html basicsLecture 2 introduction to html basics
Lecture 2 introduction to html basics
 
HTML5
HTML5 HTML5
HTML5
 
HTML
HTMLHTML
HTML
 
Introduction to Web Technology
Introduction to Web TechnologyIntroduction to Web Technology
Introduction to Web Technology
 
Unit 4 - HTTP and the Web Services - IT
Unit 4 - HTTP and the Web Services - ITUnit 4 - HTTP and the Web Services - IT
Unit 4 - HTTP and the Web Services - IT
 
Html full
Html fullHtml full
Html full
 
Session4
Session4Session4
Session4
 
Internet programming notes
Internet programming notesInternet programming notes
Internet programming notes
 
HTML Basics by software development company india
HTML Basics by software development company indiaHTML Basics by software development company india
HTML Basics by software development company india
 
Html for beginners part I
Html for beginners part IHtml for beginners part I
Html for beginners part I
 
1. HTML
1. HTML1. HTML
1. HTML
 
Web I - 02 - XHTML Introduction
Web I - 02 - XHTML IntroductionWeb I - 02 - XHTML Introduction
Web I - 02 - XHTML Introduction
 
Protocols and standards (http , html, xhtml, cgi, xml, wml, c html, etc)
Protocols and standards (http , html, xhtml, cgi, xml, wml, c html, etc)Protocols and standards (http , html, xhtml, cgi, xml, wml, c html, etc)
Protocols and standards (http , html, xhtml, cgi, xml, wml, c html, etc)
 
How the Web Works Using HTML
How the Web Works Using HTMLHow the Web Works Using HTML
How the Web Works Using HTML
 
HTML By K.Sasidhar
HTML By K.SasidharHTML By K.Sasidhar
HTML By K.Sasidhar
 
Html basics
Html basicsHtml basics
Html basics
 

Similar to Introduction to html

SEO Training in Noida- Skyinfotech.in
SEO Training in Noida- Skyinfotech.inSEO Training in Noida- Skyinfotech.in
SEO Training in Noida- Skyinfotech.inSky Infotech
 
HTML element is everything between the start tag and the end tag
HTML element is everything between the start tag and the end tagHTML element is everything between the start tag and the end tag
HTML element is everything between the start tag and the end tagssuser6478a8
 
web development.pdf
web development.pdfweb development.pdf
web development.pdfBagHarki
 
HTML Comprehensive Overview
HTML Comprehensive OverviewHTML Comprehensive Overview
HTML Comprehensive OverviewMohamed Loey
 
HTML? What is Hyper Text Mark Up Language
HTML? What is Hyper Text Mark Up  LanguageHTML? What is Hyper Text Mark Up  Language
HTML? What is Hyper Text Mark Up LanguageAnujaJape2
 
Before Starting HTML , some topics to remember.
Before Starting HTML , some topics to remember.Before Starting HTML , some topics to remember.
Before Starting HTML , some topics to remember.faiz324545
 
Computer fundamentals-internet p2
Computer fundamentals-internet p2Computer fundamentals-internet p2
Computer fundamentals-internet p2Leo Mark Villar
 
Web technologies-course 02.pptx
Web technologies-course 02.pptxWeb technologies-course 02.pptx
Web technologies-course 02.pptxStefan Oprea
 

Similar to Introduction to html (20)

SEO Training in Noida- Skyinfotech.in
SEO Training in Noida- Skyinfotech.inSEO Training in Noida- Skyinfotech.in
SEO Training in Noida- Skyinfotech.in
 
HTML & CSS.ppt
HTML & CSS.pptHTML & CSS.ppt
HTML & CSS.ppt
 
HTML element is everything between the start tag and the end tag
HTML element is everything between the start tag and the end tagHTML element is everything between the start tag and the end tag
HTML element is everything between the start tag and the end tag
 
Html-meeting1-1.pptx
Html-meeting1-1.pptxHtml-meeting1-1.pptx
Html-meeting1-1.pptx
 
web development.pdf
web development.pdfweb development.pdf
web development.pdf
 
HTML Comprehensive Overview
HTML Comprehensive OverviewHTML Comprehensive Overview
HTML Comprehensive Overview
 
HTML? What is Hyper Text Mark Up Language
HTML? What is Hyper Text Mark Up  LanguageHTML? What is Hyper Text Mark Up  Language
HTML? What is Hyper Text Mark Up Language
 
Learn html from www
Learn html from wwwLearn html from www
Learn html from www
 
Before Starting HTML , some topics to remember.
Before Starting HTML , some topics to remember.Before Starting HTML , some topics to remember.
Before Starting HTML , some topics to remember.
 
Html
HtmlHtml
Html
 
Computer fundamentals-internet p2
Computer fundamentals-internet p2Computer fundamentals-internet p2
Computer fundamentals-internet p2
 
Html.pptx
Html.pptxHtml.pptx
Html.pptx
 
Dynamic html (#1)
Dynamic  html (#1)Dynamic  html (#1)
Dynamic html (#1)
 
Html Workshop
Html WorkshopHtml Workshop
Html Workshop
 
Html notes
Html notesHtml notes
Html notes
 
mst_unit1.pptx
mst_unit1.pptxmst_unit1.pptx
mst_unit1.pptx
 
Grade 10 COMPUTER
Grade 10 COMPUTERGrade 10 COMPUTER
Grade 10 COMPUTER
 
Html introduction
Html introductionHtml introduction
Html introduction
 
Html
HtmlHtml
Html
 
Web technologies-course 02.pptx
Web technologies-course 02.pptxWeb technologies-course 02.pptx
Web technologies-course 02.pptx
 

More from Jonathan Arroyo

Steward of god’s treasures4
Steward of god’s treasures4Steward of god’s treasures4
Steward of god’s treasures4Jonathan Arroyo
 
Steward of god’s treasures3
Steward of god’s treasures3Steward of god’s treasures3
Steward of god’s treasures3Jonathan Arroyo
 
Steward of god’s treasures2
Steward of god’s treasures2Steward of god’s treasures2
Steward of god’s treasures2Jonathan Arroyo
 
Steward of god’s treasures1
Steward of god’s treasures1Steward of god’s treasures1
Steward of god’s treasures1Jonathan Arroyo
 
How to be a faithful manager of god's treasure lesson4 t
How to be a faithful manager of god's treasure lesson4 tHow to be a faithful manager of god's treasure lesson4 t
How to be a faithful manager of god's treasure lesson4 tJonathan Arroyo
 
How to be a faithful manager of god's treasure lesson3s
How to be a faithful manager of god's treasure lesson3sHow to be a faithful manager of god's treasure lesson3s
How to be a faithful manager of god's treasure lesson3sJonathan Arroyo
 
How to be a faithful manager of god's treasure lesson2s
How to be a faithful manager of god's treasure lesson2sHow to be a faithful manager of god's treasure lesson2s
How to be a faithful manager of god's treasure lesson2sJonathan Arroyo
 
How to be a faithful manager of god's treasure lesson1
How to be a faithful manager of god's treasure lesson1How to be a faithful manager of god's treasure lesson1
How to be a faithful manager of god's treasure lesson1Jonathan Arroyo
 
Homosexuality and the bible
Homosexuality and the bibleHomosexuality and the bible
Homosexuality and the bibleJonathan Arroyo
 
Humanism during renaissance
Humanism during renaissanceHumanism during renaissance
Humanism during renaissanceJonathan Arroyo
 

More from Jonathan Arroyo (14)

Steward of god’s treasures4
Steward of god’s treasures4Steward of god’s treasures4
Steward of god’s treasures4
 
Steward of god’s treasures3
Steward of god’s treasures3Steward of god’s treasures3
Steward of god’s treasures3
 
Steward of god’s treasures2
Steward of god’s treasures2Steward of god’s treasures2
Steward of god’s treasures2
 
Steward of god’s treasures1
Steward of god’s treasures1Steward of god’s treasures1
Steward of god’s treasures1
 
How to be a faithful manager of god's treasure lesson4 t
How to be a faithful manager of god's treasure lesson4 tHow to be a faithful manager of god's treasure lesson4 t
How to be a faithful manager of god's treasure lesson4 t
 
How to be a faithful manager of god's treasure lesson3s
How to be a faithful manager of god's treasure lesson3sHow to be a faithful manager of god's treasure lesson3s
How to be a faithful manager of god's treasure lesson3s
 
How to be a faithful manager of god's treasure lesson2s
How to be a faithful manager of god's treasure lesson2sHow to be a faithful manager of god's treasure lesson2s
How to be a faithful manager of god's treasure lesson2s
 
How to be a faithful manager of god's treasure lesson1
How to be a faithful manager of god's treasure lesson1How to be a faithful manager of god's treasure lesson1
How to be a faithful manager of god's treasure lesson1
 
Homosexuality and the bible
Homosexuality and the bibleHomosexuality and the bible
Homosexuality and the bible
 
Baptismal lessons
Baptismal lessonsBaptismal lessons
Baptismal lessons
 
Humanism during renaissance
Humanism during renaissanceHumanism during renaissance
Humanism during renaissance
 
The vicious circle
The vicious circleThe vicious circle
The vicious circle
 
Olympians
OlympiansOlympians
Olympians
 
Grammar instruction
Grammar instructionGrammar instruction
Grammar instruction
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 

Introduction to html

  • 2. The Internet is an immense network of networks, and the World Wide Web is the part of the Internet that is based on hypertext. The Web is made up of Web sites, each consisting of one or more Web pages that are linked together. Web Page • A web page or webpage is a resource of information that is suitable for the World Wide Web and can be accessed through a web browser. This information is usually in HTML or XHTML format, and may provide navigation to other web pages via hypertext links. Web pages are requested and served from web servers using Hypertext Transfer Protocol (HTTP). • Web pages may consist of files of static text stored within the web server's file system (static web pages), or the web server may construct the (X)HTML for each web page when it is requested by a browser (dynamic web pages). Client-side scripting can make web pages more responsive to user input once in the client browser.
  • 3. Website • A website (alternatively, web site or Web site, from the proper noun World Wide Web) is a collection of Web pages, images, videos or other digital assets that is hosted on one or more web servers, usually accessible via the Internet. • The pages of websites can usually be accessed from a common root URL called the homepage, and usually reside on the same physical server. The URLs of the pages organize them into a hierarchy, although the hyperlinks between them control how the reader perceives the overall structure and how the traffic flows between the different parts of the sites.
  • 4. Web Page Design • Web page design is a process of conceptualization, planning, modeling, and execution of electronic media content delivery via Internet in the form of technologies (such as markup languages) suitable for interpretation and display by a web browser or other web-based graphical user interfaces (GUIs). • The intent of web design is to create a web site that presents content (including interactive features or interfaces) to the end user in the form of web pages once requested. Such elements as text, forms, and bit-mapped images (GIFs, JPEGs, PNGs) can be placed on the page using HTML, XHTML, or XML tags. Displaying more complex media (vector graphics, animations, videos, sounds) usually requires plug-ins such as Flash, QuickTime, Java run-time environment, etc. Plug-ins are also embedded into web pages by using HTML or XHTML tags.
  • 5. Design Concepts • Designing a web site is defined as the arrangement and creation of web pages that in turn make up a web site. A web page consists of information for which the web site is developed. A web site might be compared to a book, where each page of the book is a web page. • There are many aspects (design concerns) in this process, and due to the rapid development of the Internet, new aspects may emerge. For non- commercial web sites, the goals may vary depending on the desired exposure and response. For typical commercial web sites, the basic aspects of design are: • Content: the substance, and information on the site should be relevant to the site and should target the area of the public that the website is concerned with. • Usability: the site should be user-friendly, with the interface and navigation simple and reliable. • Appearance: the graphics and text should include a single style that flows throughout, to show consistency. The style should be professional, appealing and relevant. • Visibility: the site must also be easy to find via most, if not all, major search engines and advertisement media.
  • 6. Introduction to HTML What is HTML? • HTML is a language for describing web pages. • HTML stands for Hyper Text Markup Language • HTML is not a programming language, it is a markup language • A markup language is a set of markup tags • HTML uses markup tags to describe web pages
  • 7. HTML Tags HTML markup tags are usually called HTML tags • HTML tags are keywords 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 • Start and end tags are also called opening tags and closing tags
  • 8. HTML Documents = Web Pages • HTML documents describe web pages • HTML documents contain HTML tags and plain text • HTML documents are also called web pages The purpose of a web browser (like Internet Explorer or Firefox) is to read HTML documents and display them as web pages. The browser does not display the HTML tags, but uses the tags to interpret the content of the page:
  • 9. • The text between <html> and </html> describes the web page • The text between <body> and </body> is the visible page content • The text between <h1> and </h1> is displayed as a heading • The text between <p> and </p> is displayed as a paragraph <html> <body> <h1>My First Heading</h1> <p>My first paragraph</p> </body> </html>
  • 10. HTML - Getting Started Editing HTML • In this tutorial we use a plain text editor (like Notepad) to edit HTML. We believe this is the best way to learn HTML. • However, professional web developers often prefer HTML editors like FrontPage or Dreamweaver, instead of writing plain text. HTM or HTML Extension? When you save an HTML file, you can use either the .htm or the .html extension. We use .htm in our examples. It is a habit from the past, when the software only allowed three letters in file extensions.
  • 11. HTML Elements • An HTML element is everything from the start tag to the end tag: Start tag * Element content End tag * <p> This is a paragraph </p> <a href="default.htm" > This is a link </a> <br /> : HTML Element Syntax • An HTML element is everything from the start tag to the end tag: • An HTML element ends with an end tag / closing tag • The element content is everything between the start and the end tag • Most HTML elements can have attributes
  • 12. HTML Document Example The example above contains 3 HTML elements. <html> <body> <p>This is my first paragraph</p> </body> </html> The Paragrahp <p> element: The <p> element defines a paragraph in the HTML document The element has a start tag <p> and an end tag </p> The element content is: This is my first paragraph
  • 13. The Body <body> element: The <body> element defines the body of the HTML document The element has a start tag <body> and an end tag </body> The element content is another HTML element (a paragraph) The HTML <html> element: The <html> element defines the whole HTML document. The element has a start tag <html> and an end tag </html> The element content is another HTML element (the body) Don't Forget the End Tag Most browsers will display HTML correctly even if you forget the end tag:
  • 14. Empty HTML Elements •HTML elements without content are called empty elements. Empty elements can be closed in the start tag. • <br> is an empty element without a closing tag (it defines a line break). •In XHTML, XML, and future versions of HTML, all elements must be closed. •Adding a slash to the start tag, like <br />, is the proper way of closing empty elements, accepted by HTML, XHTML and XML. •Even if <br> works in all browsers, writing <br /> instead is more future proof.
  • 15. Use of Lowercase Tags • HTML tags are not case sensitive: <P> means the same as <p>. Plenty of web sites use uppercase HTML tags in their pages.
  • 16. Attributes HTML Attributes • HTML elements can have attributes • Attributes provide additional information about the element • Attributes are always specified in the start tag • Attributes come in name/value pairs like: name="value" Attribute Example • HTML links are defined with the <a> tag. The link address is provided as an attribute: <a href="http://www.mfi.org.ph">This is an MFI Web site link</a>
  • 17. Headings HTML Headings • Headings are defined with the <h1> to <h6> tags. • <h1> defines the largest heading. <h6> defines the smallest heading. <h1>This is a heading</h1> <h2>This is a heading</h2> <h3>This is a heading</h3>
  • 18. Headings Are Important • Use HTML headings for headings only. Don't use headings to make text BIG or bold. • Search engines use your headings to index the structure and content of your web pages. • Since users may skim your pages by its headings, it is important to use headings to show the document structure. • H1 headings should be used as main headings, followed by H2 headings, then less important H3 headings, and so on.
  • 19. HTML Rules (Lines) The <hr /> tag is used to create an horizontal rule (line). <p>This is a paragraph</p> <hr /> <p>This is a paragraph</p> <hr /> <p>This is a paragraph</p> HTML Comments Comments can be inserted in the HTML code to make it more readable and understandable. Comments are ignored by the browser and are not displayed. <!-- This is a comment --> Note: There is an exclamation point after the opening bracket, but not before the closing bracket.
  • 20. <html> <body> <!--This is not a rugular paragraph--> <p>This is a regular paragraph</p> </body> </html> This is a regular paragraph Example Code Result HTML Tag Reference Tag Description <html> Defines an HTML document <body> Defines the document's body <h1> to <h6> Defines header 1 to header 6 <hr /> Defines a horizontal rule <!--> Defines a comment
  • 21. HTML Paragraphs Paragraphs are defined with the <p> tag. <p>This is a paragraph</p> <p>This is another paragraph</p> Note: Browsers automatically add an empty line before and after paragraphs. Don't Forget the End Tag HTML Line Breaks Use the <br /> tag if you want a line break (a new line) without starting a new paragraph: The <br /> element is an empty HTML element. It has no end tag.
  • 22. <br> or <br /> • In XHTML, XML, and future versions of HTML, HTML elements with no end tag (closing tag) are not allowed. • Even if <br> works in all browsers, writing <br /> instead is more future proof. <html> <body> <p>This is<br />a para<br />graph with line breaks</p> </body> </html> This is a para graph with line breaks Example Code Result
  • 23. Tag Reference Tag Description <p> Defines a paragraph <br /> Inserts a single line break
  • 24. HTML Text Formatting <html> <body> <p><b>This text is bold</b></p> <p><big>This text is big</big></p> <p><i>This text is italic</i></p> <p><code>This is computer output</code></p> <p>This is<sub> subscript</sub> and <sup>superscript</sup></p> </body> </html> This text is bold This text is big This text is italic This is computer output This is subscript and superscript Example Code Result
  • 25. Tag Description <b> Defines bold text <big> Defines big text <em> Defines emphasized text <i> Defines italic text <small> Defines small text <strong> Defines strong text <sub> Defines subscripted text <sup> Defines superscripted text <ins> Defines inserted text <del> Defines deleted text Text Formatting Tags
  • 26. HTML Styles Look! Styles and colors This text is in Verdana and red This text is in Times and blue This text is 30 pixels high The HTML Style Attribute The purpose of the style attribute is: To provide a common way to style all HTML elements. With HTML styles, styles can be added to HTML elements directly by using the style attribute, or indirectly in separate style sheets (CSS files).
  • 27. HTML Style Examples • style="background-color:yellow" • style="font-size:10px" • style="font-family:Times" • style="text-align:center“ Background Color <body style="background-color:yellow"> Font Family, Color and Size <p style="font-family:courier new; color:red; font-size:20px"> Text Alignment <h1 style="text-align:center">
  • 28. HTML Links Hyperlinks, Anchors, and Links • In web terms, a hyperlink is a reference (an address) to a resource on the web. • Hyperlinks can point to any resource on the web: an HTML page, an image, a sound file, a movie, etc. • An anchor is a term used to define a hyperlink destination inside a document. The HTML anchor element <a>, is used to define both hyperlinks and anchors. We will use the term HTML link when the <a> element points to a resource, and the term HTML anchor when the <a> elements defines an address inside a document..
  • 29. HTML Link The href Attribute • The href attribute defines the link "address". • This <a> element defines a link to MFI Foundation: <a href="http://www.mfi.org.ph/">Visit MFI Foundation!</a> The code above will display like this in a browser: Visit MFI Foudation!
  • 30. <html> <body style="background-color:PowderBlue;"> <h1>Look! Styles and colors</h1> <p style="font-family:verdana;color:red"> This text is in Verdana and red</p> <p style="font-family:times;color:green"> This text is in Times and green</p> <p style="font-size:30px">This text is 30 pixels high</p> </body> </html> Look! Styles and colors This text is in Verdana and red This text is in Times and green This text is 30 pixels high Example Code Result
  • 31. Image as Link <html> <body> <p>Create a link of an image: <a href="http://www.mfi.org.ph"> <img src="smiley.gif" alt="MFI website" width="32" height="32" /> </a></p> <p>No border around the image, but still a link: <a href="http://edge.mfi.org.ph/edge2"> <img border="0" src="smiley.gif" alt="MFI Web Site" width="32" height="32" /> </a></p> </body> </html> Create a link of an No border around the image, but still a Example Code Result
  • 32. Link to a location on the same Page Example Code Result <html> <body> <p> <a href="#C6">See also Chapter 4.</a> </p> <h2>Chapter 1</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 2</h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 3</h2> <p>This chapter explains ba bla bla</p> <h2Chapter 4</a></h2> <p>This chapter explains ba bla bla</p> <h2>Chapter 5</h2> <p>This chapter explains ba bla bla</p> <h2> ><a name=“C6“>Chapter 6</h2> <p>This chapter explains ba bla bla</p> </body> </html> See also Chapter 6 Chapter 1 This chapter explains ba bla bla Chapter 2 This chapter explains ba bla bla Chapter 3 This chapter explains ba bla bla Chapter 4 This chapter explains ba bla bla Chapter 5 This chapter explains ba bla bla Chapter 6 This chapter explains ba bla bla
  • 33. Images The Image Tag and the Src Attribute In HTML, images are defined with the <img> tag. The <img> tag is empty, which means that it contains attributes only and it has no closing tag. To display an image on a page, you need to use the src attribute. Src stands for "source". The value of the src attribute is the URL of the image you want to display on your page. <img src="url" /> The URL points to the location where the image is stored.
  • 34. The Alt Attribute The alt attribute is used to define an "alternate text" for an image. The value of the alt attribute is an author-defined text: <img src="boat.gif" alt="Big Boat" /> The "alt" attribute tells the reader what he or she is missing on a page if the browser can't load images. The browser will then display the alternate text instead of the image.
  • 35. <html> <body background="bg.jpg"> <h3>Look: A background image!</h3> <p>Both gif and jpg files can be used as HTML backgrounds.</p> <p>If the image is smaller than the page, the image will repeat itself.</p> </body> </html> Look: A background image! Both gif and jpg files can be used as HTML backgrounds. If the image is smaller than the page, the image will repeat itself. Example Code Result
  • 36. <html> <body> <p>An image <img src=“smiley.gif" align="bottom" width="48" height="48" /> in the text.</p> <p>An image <img src=“smiley.gif" align="middle" width="48" height="48" /> in the text.</p> <p>An image <img src=“smiley.gif" align="top" width="48" height="48"/> in the text.</p> <p><b>Note:</b> The bottom alignment is the default!</p> <p>An image <img src=“smiley.gif" width="48" height="48" /> in the text.</p> <p><img src=“smiley.gif" width="48" height="48" /> An image before the text.</p> <p>An image after the text. <img src=“smiley.gif" width="48" height="48" /></p> </body> </html> Code
  • 37. An image in the text. An image in the text. An image in the text. Note: The bottom alignment is the default! An image in the text. An image before the text. An image after the text. Result
  • 38. <html> <body> <p>Click on the sun or on one of the planets to watch it closer:</p> <img src="planets.gif" width="145" height="126" alt="Planets" usemap="#planetmap" /> <map name="planetmap"> <area shape="rect" coords="0,0,82,126" alt="Sun" href="sun.htm" /> <area shape="circle" coords="90,58,3" alt="Mercury" href="mercur.htm" /> <area shape="circle" coords="124,58,8" alt="Venus" href="venus.htm" /> </map> </body> </html>
  • 39. Tables Tables are defined with the <table> tag. A table is divided into rows (with the <tr> tag), and each row is divided into data cells (with the <td> tag). The letters td stands for "table data," which is the content of a data cell. A data cell can contain text, images, lists, paragraphs, forms, horizontal rules, tables, etc. <table border="1"> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </table> row 1, cell 1 row 1, cell 2 row 2, cell 1 row 2, cell 2
  • 40. Headings in a Table <table border="1"> <tr> <th>Heading</th> <th>Another Heading</th> </tr> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </table> Heading Another Heading row 1, cell 1 row 1, cell 2 row 2, cell 1 row 2, cell 2 Example Code Result
  • 41. <html> <body> <h4>Cell that spans two columns:</h4> <table border="1"> <tr> <th>Name</th> <th colspan="2">Telephone</th> </tr> <tr> <td>Bill Gates</td> <td>555 77 854</td> <td>555 77 855</td> </tr> </table> <h4>Cell that spans two rows:</h4> <table border="1"> <tr> <th>First Name:</th> <td>Bill Gates</td> </tr> <tr> <th rowspan="2">Telephone:</th> <td>555 77 854</td> </tr> <tr> <td>555 77 855</td> </tr> </table> </body> </html> Name Telephone Bill Gates 555 77 854 555 77 855 First Name: Bill Gates Telephone: 555 77 854 555 77 855 Cell that spans two columns: Cell that spans two rows:
  • 42. Lists HTML supports ordered, unordered and definition lists. Unordered Lists An unordered list is a list of items. The list items are marked with bullets (typically small black circles). An unordered list starts with the <ul> tag. Each list item starts with the <li> tag. Here is how it looks in a browser: • Coffee • Milk Inside a list item you can put paragraphs, line breaks, images, links, other lists, etc.
  • 43. Ordered Lists An ordered list is also a list of items. The list items are marked with numbers. An ordered list starts with the <ol> tag. Each list item starts with the <li> tag. Here is how it looks in a browser: 1. Coffee 2. Milk Inside a list item you can put paragraphs, line breaks, images, links, other lists, etc.
  • 44. Definition Lists A definition list is not a list of single items. It is a list of items (terms), with a description of each item (term). A definition list starts with a <dl> tag (definition list). Each term starts with a <dt> tag (definition term). Each description starts with a <dd> tag (definition description). Here is how it looks in a browser: Coffee Black hot drink Milk White cold drink Inside the <dd> tag you can put paragraphs, line breaks, images, links, other lists, etc.
  • 45. <ul> <li>Coffee</li> <li>Milk</li> </ul> Unordered Lists <ol> <li>Coffee</li> <li>Milk</li> </ol> Ordered Lists Definition Lists <dl> <dt>Coffee</dt> <dd>Black hot drink</dd> <dt>Milk</dt> <dd>White cold drink</dd> </dl>
  • 46. Nested List <html> <body> <h4>A nested List:</h4> <ul> <li>Coffee</li> <li>Tea <ul> <li>Black tea</li> <li>Green tea</li> </ul> </li> <li>Milk</li> </ul> </body> </html> A nested List: •Coffee •Tea oBlack tea oGreen tea •Milk
  • 47. Forms and Input Forms are used to select different kinds of user input. A form is an area that can contain form elements. Form elements are elements that allow the user to enter information (like text fields, textarea fields, drop-down menus, radio buttons, checkboxes, etc.) in a form. A form is defined with the <form> tag. Input The most used form tag is the <input> tag. The type of input is specified with the type attribute.
  • 48. Text Fields Text fields are used when you want the user to type letters, numbers, etc. in a form. <form> First name: <input type="text" name="firstname" /> <br /> Last name: <input type="text" name="lastname" /> </form> How it looks in a browser: First name: Last name: Note that the form itself is not visible. Also note that in most browsers, the width of the text field is 20 characters by default.
  • 49. Radio Buttons Radio Buttons are used when you want the user to select one of a limited number of choices. <form> <input type="radio" name="sex" value="male" /> Male <br /> <input type="radio" name="sex" value="female" /> Female </form> How it looks in a browser: Male Female Note that only one option can be chosen.
  • 50. Checkboxes Checkboxes are used when you want the user to select one or more options of a limited number of choices. <form> I have a motorcycle: <input type="checkbox" name="vehicle" value="Bike" /> <br /> I have a bicycle: <input type="checkbox" name="vehicle" value="Car" /> <br /> I have a car: <input type="checkbox" name="vehicle" value="Airplane" /> </form> How it looks in a browser: I have a motorcycle: I have a bicycle: I have an car:
  • 51. The Form's Action Attribute and the Submit Button When the user clicks on the "Submit" button, the content of the form is sent to the server. The form's action attribute defines the name of the file to send the content to. The file defined in the action attribute usually does something with the received input. <form name="input" action="html_form_submit.asp" method="get"> Username: <input type="text" name="user" /> <input type="submit" value="Submit" /> </form> How it looks in a browser Username: Submit

Editor's Notes

  1. The start tag is often called the opening tag . The end tag is often called the closing tag . (You will learn about element attributes in the next chapter of this tutorial)
  2. Attributes provide additional information about HTML elements.
  3. It is a good practice to include the &quot;alt&quot; attribute for each image on a page, to improve the display and usefulness of your document for people who have text-only browsers.
  4. If you type some characters in the text field above, and click the &quot;Submit&quot; button, the browser will send your input to a page called &quot;html_form_submit.asp&quot;. The page will show you the received input.