HTML
Mohamed Loey
Agenda
Part I: Introduction
Part II: HTML Tags (Basic)
Part III: HTML Tags
Part V: HTML Forms
Agenda
Part I: Introduction
 What is HTML?
 Client & Server
 HTML Versions
 HTML Tags
 HTML Page Structure
 Web Browsers
 HTML Editors
What is HTML?
• 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
Client & Server
HTML Versions
Version Year
HTML 1991
HTML+ 1993
HTML 2.0 1995
HTML 3.2 1997
HTML 4.01 1999
XHTML 2000
HTML5 2012
HTML Tags
• HTML tags are keywords (tag names) surrounded
by angle brackets like <html>
• 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 slash before the tag name
• Start and end tags are also called opening
tags and closing tags
• HTML tags normally come in pairs like <html>
and </html>
HTML Page Structure
Web Browsers
• A browser is a software program which
interprets the HTML documents and displays it
on the user’s screen.
• The purpose of a web browser (such as
Google Chrome, Internet Explorer, Firefox,
Safari) is to read HTML documents and
display them as web pages.
Web Browsers
HTML Code Chrome Browser
HTML Editors
• Write HTML Using Notepad or TextEdit
• We believe using a simple text editor
(Notepad) is a good way to learn HTML.
• Follow the 4 steps below to create your first
web page with Notepad.
Step 1: Open Notepad
• To open Notepad in Windows 7 or earlier:
• Click Start (bottom left on your screen).
• Click All Programs. Click Accessories.
• Click Notepad.
• To open Notepad in Windows 8 or later:
• Open the Start Screen (the window symbol at the
bottom left on your screen).
• Type Notepad.
Step 2: Write Some HTML
• Write or copy some HTML into Notepad.
Step 3: Save the HTML Page
• Save the file on your computer.
• Select File -> Save as in the Notepad menu.
• When saving an HTML file, use either the .htm
or the .html file extension. There is no
difference, it is entirely up to you.
Step 4: View HTML Page in Your Browser
• Double-click your saved HTML file, and the
result will look much like this:
Professional HTML Editors
• HTML can be edited by using a professional
HTML editor like:
• Adobe Dreamweaver
• Netbeans
• CoffeeCup HTML Editor
• Microsoft Expression Web
Adobe Dreamweaver
Agenda
Part II: HTML Tags (Basic)
 HTML Head Tag
 HTML Body Tag
 HTML Basic Tags
 HTML Heading Tags
 HTML Paragraph Tag
 HTML Formatting Tags
 HTML Attributes
 HTML Styles
HTML Head Tag
• The <head> element is a container for all the
head elements. Elements inside <head> can
include scripts, instruct the browser where to
find style sheets, provide meta information,
and more.
• The following tags can be added to the head
section: <title>, <style>, <meta>, <link>,
<script>, <noscript>, and <base>.
• The <title> tag defines the title of the
document.
HTML Body Tag
• The <body> tag defines the document's body.
• The <body> element contains all the contents
of an HTML document, such as text,
hyperlinks, images, tables, lists, etc.
HTML Body & Head Tag example
HTML Body & Head Tag
• On Chrome Browser
HTML Basic Tags
Tag Description
<!DOCTYPE> Defines the document type
<html> Defines an HTML document
<title> Defines a title for the document
<body> Defines the document's body
<h1> to <h6> Defines HTML headings
<p> Defines a paragraph
<br /> Inserts a single line break
<hr /> Defines a thematic change in the
content
<!--...--> Defines a comment
HTML Heading Tags
• HTML headings are defined with the <h1> to
<h6> tags.
• Example:
HTML Heading Tags
• On Chrome Browser
HTML Paragraph Tag
• HTML paragraphs are defined with the <p>
tag.
• Example:
HTML Paragraph Tag
• On Chrome Browser
HTML Formatting Tags
Tag Description
<u> Defines text that should be stylistically different from
normal text
<strong> Defines important text
<b> Defines bold text
<i> Defines a part of text in an alternate voice or mood
<small> Defines smaller text
<big> Not supported in HTML5. Use CSS instead. Defines big text
<font> Not supported in HTML5. Use CSS instead. Defines font,
color, and size for text
<center> Not supported in HTML5. Use CSS instead. Defines
centered text
HTML Formatting Tags
• HTML uses tags like <b> and <i> for
formatting output, like bold or italic text.
• Example:
HTML Formatting Tags
• On Chrome Browser
HTML Attributes
• HTML elements can have attributes
• Attributes provide additional
information about an element
• Attributes are always specified in the start tag
• Attributes come in name/value pairs
like: name="value"
HTML Attributes
• Example:
HTML Attributes
• On Chrome Browser
HTML Styles
• Example:
HTML Styles
• On Chrome Browser
Agenda
Part III: HTML Tags
 HTML Lists Tags
 Unordered Lists Tags
 Ordered Lists Tags
 HTML Hyperlink Tag
 HTML Image Tag
 HTML Table Tags
 HTML Layouts
HTML Lists Tags
Tag Description
<ul> Defines an unordered list
<ol> Defines an ordered list
<li> Defines a list item
<dir> Not supported in HTML5. Use <ul> instead.
Defines a directory list
<dl> Defines a description list
<dt> Defines a term/name in a description list
<dd> Defines a description of a term/name in a description list
Unordered Lists Tags
• An unordered list starts with the <ul> tag.
Each list item starts with the <li> tag.
• Example:
Unordered Lists Tags
• On Chrome Browser
Ordered Lists Tags
• An ordered list starts with the <ol> tag. Each
list item starts with the <li> tag.
• Example:
Ordered Lists Tags
• On Chrome Browser
HTML Hyperlink Tag
• The HTML <a> tag defines a hyperlink.
• A hyperlink (or link) is a word, group of words,
or image that you can click on to jump to
another document.
• When you move the cursor over a link in a
Web page, the arrow will turn into a little hand.
HTML Hyperlink Tag
• Example:
HTML Hyperlink Tag
• On Chrome Browser
HTML Image Tag
• In HTML, images are defined with the <img>
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.
HTML Image Tag
• Example:
HTML Image Tag
• On Chrome Browser
HTML Table Tags
Tag Description
<table> Defines a table
<caption> Defines a table caption
<th> Defines a header cell in a table
<tr> Defines a row in a table
<td> Defines a cell in a table
<thead> Groups the header content in a table
<tbody> Groups the body content in a table
<tfoot> Groups the footer content in a table
HTML Table Tags
• Tables are defined with the <table> tag.
• A table is divided into rows with the <tr> tag.
(tr stands for table row)
• A row is divided into data cells with
the <td> tag. (td stands for table data)
HTML Table Tags
• Examlpe:
HTML Table Tags
• On Chrome Browser
HTML Layouts
• Most websites have put their content in
multiple columns (formatted like a magazine or
newspaper).
• Multiple columns are created by using <div>
or <table> elements.
• The div element is a block level element used
for grouping HTML elements.
• A simple way of creating layouts is by using
the HTML <table> tag.
HTML Layouts
• <div> example:
HTML Layouts
• On Chrome Browser
HTML Layouts
• <Table> Tag Example
HTML Layouts
• On Chrome Browser
Agenda
Part V: HTML Forms
 HTML Forms and Input Tags
 HTML Form Tag
 Text Fields
 Password Field
 Radio Buttons
 Checkboxes
 Submit Button
HTML Forms and Input Tags
Tag Description
<form> Defines an HTML form for user input
<input> Defines an input control
<textarea> Defines a multiline input control (text area)
<button> Defines a clickable button
<select> Defines a drop-down list
<optgroup> Defines a group of related options in a drop-down list
<option> Defines an option in a drop-down list
<label> Defines a label for an <input> element
HTML Form Tag
• HTML forms are used to pass data to a
server.
• An HTML form can contain input elements like
text fields, checkboxes, radio-buttons, submit
buttons and more. A form can also contain
select lists, textarea, fieldset, legend, and label
elements.
• The <form> tag is used to create an HTML
form
• The most important form element is the
<input> element.
Text Fields
• On Chrome Browser
Text Fields
• Example:
Password Field
• On Chrome Browser
Password Field
• Example:
Radio Buttons
• On Chrome Browser
Radio Buttons
• Example:
Checkboxes
• On Chrome Browser
Checkboxes
• Example:
Submit Button
• A submit button is used to send form data to
a server. The data is sent to the page specified
in the form's action attribute.
• On Chrome Browser
Submit Button
• Example:
THANK U

HTML Comprehensive Overview

  • 1.
  • 2.
    Agenda Part I: Introduction PartII: HTML Tags (Basic) Part III: HTML Tags Part V: HTML Forms
  • 3.
    Agenda Part I: Introduction What is HTML?  Client & Server  HTML Versions  HTML Tags  HTML Page Structure  Web Browsers  HTML Editors
  • 4.
    What is HTML? •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
  • 5.
  • 6.
    HTML Versions Version Year HTML1991 HTML+ 1993 HTML 2.0 1995 HTML 3.2 1997 HTML 4.01 1999 XHTML 2000 HTML5 2012
  • 7.
    HTML Tags • HTMLtags are keywords (tag names) surrounded by angle brackets like <html> • 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 slash before the tag name • Start and end tags are also called opening tags and closing tags • HTML tags normally come in pairs like <html> and </html>
  • 8.
  • 9.
    Web Browsers • Abrowser is a software program which interprets the HTML documents and displays it on the user’s screen. • The purpose of a web browser (such as Google Chrome, Internet Explorer, Firefox, Safari) is to read HTML documents and display them as web pages.
  • 10.
    Web Browsers HTML CodeChrome Browser
  • 11.
    HTML Editors • WriteHTML Using Notepad or TextEdit • We believe using a simple text editor (Notepad) is a good way to learn HTML. • Follow the 4 steps below to create your first web page with Notepad.
  • 12.
    Step 1: OpenNotepad • To open Notepad in Windows 7 or earlier: • Click Start (bottom left on your screen). • Click All Programs. Click Accessories. • Click Notepad. • To open Notepad in Windows 8 or later: • Open the Start Screen (the window symbol at the bottom left on your screen). • Type Notepad.
  • 13.
    Step 2: WriteSome HTML • Write or copy some HTML into Notepad.
  • 14.
    Step 3: Savethe HTML Page • Save the file on your computer. • Select File -> Save as in the Notepad menu. • When saving an HTML file, use either the .htm or the .html file extension. There is no difference, it is entirely up to you.
  • 15.
    Step 4: ViewHTML Page in Your Browser • Double-click your saved HTML file, and the result will look much like this:
  • 16.
    Professional HTML Editors •HTML can be edited by using a professional HTML editor like: • Adobe Dreamweaver • Netbeans • CoffeeCup HTML Editor • Microsoft Expression Web
  • 17.
  • 18.
    Agenda Part II: HTMLTags (Basic)  HTML Head Tag  HTML Body Tag  HTML Basic Tags  HTML Heading Tags  HTML Paragraph Tag  HTML Formatting Tags  HTML Attributes  HTML Styles
  • 19.
    HTML Head Tag •The <head> element is a container for all the head elements. Elements inside <head> can include scripts, instruct the browser where to find style sheets, provide meta information, and more. • The following tags can be added to the head section: <title>, <style>, <meta>, <link>, <script>, <noscript>, and <base>. • The <title> tag defines the title of the document.
  • 20.
    HTML Body Tag •The <body> tag defines the document's body. • The <body> element contains all the contents of an HTML document, such as text, hyperlinks, images, tables, lists, etc.
  • 21.
    HTML Body &Head Tag example
  • 22.
    HTML Body &Head Tag • On Chrome Browser
  • 23.
    HTML Basic Tags TagDescription <!DOCTYPE> Defines the document type <html> Defines an HTML document <title> Defines a title for the document <body> Defines the document's body <h1> to <h6> Defines HTML headings <p> Defines a paragraph <br /> Inserts a single line break <hr /> Defines a thematic change in the content <!--...--> Defines a comment
  • 24.
    HTML Heading Tags •HTML headings are defined with the <h1> to <h6> tags. • Example:
  • 25.
    HTML Heading Tags •On Chrome Browser
  • 26.
    HTML Paragraph Tag •HTML paragraphs are defined with the <p> tag. • Example:
  • 27.
    HTML Paragraph Tag •On Chrome Browser
  • 28.
    HTML Formatting Tags TagDescription <u> Defines text that should be stylistically different from normal text <strong> Defines important text <b> Defines bold text <i> Defines a part of text in an alternate voice or mood <small> Defines smaller text <big> Not supported in HTML5. Use CSS instead. Defines big text <font> Not supported in HTML5. Use CSS instead. Defines font, color, and size for text <center> Not supported in HTML5. Use CSS instead. Defines centered text
  • 29.
    HTML Formatting Tags •HTML uses tags like <b> and <i> for formatting output, like bold or italic text. • Example:
  • 30.
    HTML Formatting Tags •On Chrome Browser
  • 31.
    HTML Attributes • HTMLelements can have attributes • Attributes provide additional information about an element • Attributes are always specified in the start tag • Attributes come in name/value pairs like: name="value"
  • 32.
  • 33.
    HTML Attributes • OnChrome Browser
  • 34.
  • 35.
    HTML Styles • OnChrome Browser
  • 36.
    Agenda Part III: HTMLTags  HTML Lists Tags  Unordered Lists Tags  Ordered Lists Tags  HTML Hyperlink Tag  HTML Image Tag  HTML Table Tags  HTML Layouts
  • 37.
    HTML Lists Tags TagDescription <ul> Defines an unordered list <ol> Defines an ordered list <li> Defines a list item <dir> Not supported in HTML5. Use <ul> instead. Defines a directory list <dl> Defines a description list <dt> Defines a term/name in a description list <dd> Defines a description of a term/name in a description list
  • 38.
    Unordered Lists Tags •An unordered list starts with the <ul> tag. Each list item starts with the <li> tag. • Example:
  • 39.
    Unordered Lists Tags •On Chrome Browser
  • 40.
    Ordered Lists Tags •An ordered list starts with the <ol> tag. Each list item starts with the <li> tag. • Example:
  • 41.
    Ordered Lists Tags •On Chrome Browser
  • 42.
    HTML Hyperlink Tag •The HTML <a> tag defines a hyperlink. • A hyperlink (or link) is a word, group of words, or image that you can click on to jump to another document. • When you move the cursor over a link in a Web page, the arrow will turn into a little hand.
  • 43.
  • 44.
    HTML Hyperlink Tag •On Chrome Browser
  • 45.
    HTML Image Tag •In HTML, images are defined with the <img> 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.
  • 46.
  • 47.
    HTML Image Tag •On Chrome Browser
  • 48.
    HTML Table Tags TagDescription <table> Defines a table <caption> Defines a table caption <th> Defines a header cell in a table <tr> Defines a row in a table <td> Defines a cell in a table <thead> Groups the header content in a table <tbody> Groups the body content in a table <tfoot> Groups the footer content in a table
  • 49.
    HTML Table Tags •Tables are defined with the <table> tag. • A table is divided into rows with the <tr> tag. (tr stands for table row) • A row is divided into data cells with the <td> tag. (td stands for table data)
  • 50.
  • 51.
    HTML Table Tags •On Chrome Browser
  • 52.
    HTML Layouts • Mostwebsites have put their content in multiple columns (formatted like a magazine or newspaper). • Multiple columns are created by using <div> or <table> elements. • The div element is a block level element used for grouping HTML elements. • A simple way of creating layouts is by using the HTML <table> tag.
  • 53.
  • 54.
    HTML Layouts • OnChrome Browser
  • 55.
  • 56.
    HTML Layouts • OnChrome Browser
  • 57.
    Agenda Part V: HTMLForms  HTML Forms and Input Tags  HTML Form Tag  Text Fields  Password Field  Radio Buttons  Checkboxes  Submit Button
  • 58.
    HTML Forms andInput Tags Tag Description <form> Defines an HTML form for user input <input> Defines an input control <textarea> Defines a multiline input control (text area) <button> Defines a clickable button <select> Defines a drop-down list <optgroup> Defines a group of related options in a drop-down list <option> Defines an option in a drop-down list <label> Defines a label for an <input> element
  • 59.
    HTML Form Tag •HTML forms are used to pass data to a server. • An HTML form can contain input elements like text fields, checkboxes, radio-buttons, submit buttons and more. A form can also contain select lists, textarea, fieldset, legend, and label elements. • The <form> tag is used to create an HTML form • The most important form element is the <input> element.
  • 60.
    Text Fields • OnChrome Browser
  • 61.
  • 62.
    Password Field • OnChrome Browser
  • 63.
  • 64.
    Radio Buttons • OnChrome Browser
  • 65.
  • 66.
  • 67.
  • 68.
    Submit Button • Asubmit button is used to send form data to a server. The data is sent to the page specified in the form's action attribute. • On Chrome Browser
  • 69.
  • 70.