SlideShare une entreprise Scribd logo
Lecture 5
HTML
Boriana Koleva
Room: C54
Email: bnk@cs.nott.ac.uk
Overview
 Origins and evolution of HTML and
XHTML
 Basic Syntax
 Standard document structure
 Basic text markup
 Images
 Hypertext links
 Lists
Origins and Evolution of HTML
 Hypertext Markup Language
 Developed for the delivery of hypertext
on the WWW
 Built using SGML
 ASCII “Markup Language”
Recent Versions
 HTML 4.0 – 1997
• Introduced many new features and deprecated many
older features
 HTML 4.01 - 1999 - A cleanup of 4.0
 XHTML 1.0 - 2000
• Just 4.01 defined using XML, instead of SGML
 XHTML 1.1 – 2001
• Modularized 1.0, and drops frames
 XHTML 2.0 – development abandoned
 HTML 5.0
• Working Draft (not a W3C Recommendation yet)
• HTML and XHTML syntax
HTML versus XHTML
 HTML has lax syntax rules, leading to sloppy
and sometime ambiguous documents
 XHTML syntax is much more strict, leading
to clean and clear documents in a standard form
 Even minor syntax errors will prevent a document
labelled as XML from being rendered fully, whereas
they would be ignored in the HTML syntax
 HTML compatible with most legacy Web browsers
Editing (X)HTML
 Creating HTML documents
• Text editors (e.g. Notepad, Emacs, Crimson Editor)
• Source code editors (e.g. Notepad++, WebTide)
• Authoring tools (e.g. Microsoft Expression Web,
Adobe Dreamwaver, KompoZer)
 HTML files have .html extension
 The filename of your homepage should be
index.html
• If a browser does not request a specific file in a
directory, normal Web server response is to return
index.html
• http://www.crg.cs.nott.ac.uk/~bnk/Teaching/WPS/
Basic Syntax
 Elements are defined by tags (markers)
 Tag format:
• Opening tag: <name>
• Closing tag: </name>
 The opening tag and its closing tag together
specify a container for the content they enclose
• E.g. <p> Hello </p>
 Not all tags have content
• E.g. <hr>
Basic Syntax 2
 The container and its content together are
called an element
 If a tag has attributes, they appear between its
name and the right bracket of the opening tag
• E.g. <img src = “c10.jpg” />
 Comment form: <!-- … -->
 Browsers ignore comments, unrecognizable
tags, line breaks, multiple spaces, and tabs
 Tags are just suggestions to the browser,
even if they are recognized by the browser
HTML Document Structure
 An HTML document is composed of 3 parts:
1. a line containing HTML version information, e.g.:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
Note: <!DOCTYPE html> for HTML5
2. a declarative header section
• Delimited with the <head> tag
• The <title>tag is used to give the document a title
• normally displayed in the browser’s window title bar
3. a body containing the document's actual content
• Delimited with the <body> tag
 After document type declaration, the remainder of an
HTML document is contained by the html element
Basic HTML Document
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title> … </title>
<meta http-equiv="Content-Type"
content="text/html;charset=utf-8" >
</head>
<body>
…
</body>
</html>
Basic Text Markup
 Paragraph Elements: <p>
• Text is normally placed in paragraph elements
• The browser puts as many words of the
paragraph’s content as will fit in each line
<p>
Greetings!
</p>
• Simple HTML example
http://www.cs.nott.ac.uk/~bnk/WPS/simple.html
Basic Text Markup 2
 Line breaks: <br>
 Horizontal rules: <hr>
 Headings
• Six sizes, 1 - 6, specified with <h1> to <h6>
• 1, 2, and 3 use font sizes that are larger than the default
font size
• 4 uses the default size
• 5 and 6 use smaller font sizes
• Headings example
http://www.cs.nott.ac.uk/~bnk/WPS/headings.html
Basic Text Markup 3
 Blockquotes: <blockquote>
• To set a block of text off from the normal flow and
appearance of text
• Browsers often indent, and sometimes italicize
http://www.cs.nott.ac.uk/~bnk/WPS/blockquote.html
 Font Styles and Sizes (can be nested)
• Boldface: <b>
• Italics: <i>
• Smaller: <small>
• Larger: <big> (not supported in HTML5)
• Monospace: <tt> (not supported in HTML5)
Basic Text Markup 4
Example: The <big> sleet <big> in <big>
<i> Crete </i><br /> lies </big>
completely </big> in </big> the street
Display: The sleet in Crete
lies completely in the street
 Subscripts: <sub> Superscripts: <sup>
Example: x<sub>2</sub><sup>3</sup>
Display: x2
3
Basic Text Markup 5
 Character Entities
the only
named
character
entity
references
in HTML5
Images
 All modern web browsers can display images
inline (i.e. embedded in the text)
 GIF (Graphic Interchange Format)
• 8-bit color (256 different colors)
 JPEG (Joint Photographic Experts Group)
• 24-bit colour (16 million different colours)
 Portable Network Graphics (PNG)
• Relatively new
• Designed for transferring images on the Internet
Images 2
 Images are inserted into a document with the
<img> tag with the src attribute
 The alt attribute is required by HTML
• (in HTML5 can be omitted when textual desc. not available )
• Non-graphical browsers
• Browsers with images turned off
<img src = “logo.jpg"
alt = “University of Nottingham Logo" />
 The <img> tag has other optional attributes,
including width and height (in pixels)
http://www.cs.nott.ac.uk/~bnk/WPS/image.html
Linking on the Web
Document 1
Here is a link to document 2
Document 2
This is document 2.
Anchor
Link
(reference) Destination
Source
Hypertext Links
 Hypertext is the essence of the Web!
 A link is specified with the href (hypertext
reference) attribute of <a> (the anchor tag)
 The content of <a> is the visual link in the
document
<a href=“target.html”>This is a link</a>
 Relative addressing of targets is easier to
maintain and more portable than absolute
addressing
http://www.cs.nott.ac.uk/~bnk/WPS/link.html
Targets within Documents
 If the target is not at the beginning of the
document, the target spot must be marked
 Target labels can be defined in many different
tags with the id attribute
<h1 id = "baskets"> Baskets </h1>
 The link to an id must be preceded by a pound
sign (#)
• target is in the same document,
<a href = "#baskets"> Baskets </a>
• target is in a different document
<a href = "myAd.html#baskets”> Baskets </a>
Image Hyperlinks
 Links can include images in their content
<a href = "c210data.html“>
<img src = "smallplane.jpg"
alt = "Small picture of an airplane " >
Info on C210 </a>
Unordered Lists
 The list is the content of the <ul> tag
 List elements are the content of the <li> tag
<h3> Some Common Single-Engine Aircraft </h3>
<ul>
<li> Cessna Skyhawk </li>
<li> Beechcraft Bonanza </li>
<li> Piper Cherokee </li>
</ul>
Ordered Lists
 The list is the content of the <ol> tag
 Each item in the display is preceded by a sequence value
<h3> Cessna 210 Engine Starting Instructions </h3>
<ol>
<li> Set mixture to rich </li>
<li> Set propeller to high RPM </li>
<li> Set ignition switch to "BOTH" </li>
<li> Set auxiliary fuel pump switch to
"LOW PRIME" </li>
<li> When fuel pressure reaches 2 to 2.5
PSI, push starter button </li>
</ol>
Nested Lists
 Any type list can be nested inside any type list
 The nested list must be in a list item
<ol>
<li> Single-Engine Aircraft
<ol>
<li> Tail wheel </li>
<li> Tricycle </li>
</ol> <br>
</li>
<li> Dual-Engine Aircraft
<ol>
<li> Wing-mounted engines </li>
<li> Push-pull fuselage-mounted engines </li>
</ol>
</li>
</ol> http://www.cs.nott.ac.uk/~bnk/WPS/nested_lists.html
Definition Lists (for glossaries)
 List is the content of the <dl> tag
 Terms being defined are the content of the <dt>
tag
 The definitions themselves are the content of the
<dd> tag
<dl>
<dt> 152 </dt>
<dd> Two-place trainer </dd>
<dt> 172 </dt>
<dd> Smaller four-place airplane </dd
</dl> http://www.cs.nott.ac.uk/~bnk/WPS/definition.html
Validation
 W3C HTML Validation Service
• http://validator.w3.org/
Syntactic Differences
between HTML & XHTML
 Case sensitivity
 Closing tags
 Quoted attribute values
 Explicit attribute values
 id and name attributes
 Element nesting
Summary
 Origins and evolution of HTML and XHTML
 Basic syntax and standard document
structure
 Basic text markup
 Images
 Hypertext links
 Lists (unordered, ordered, definition)
 Validation
 HTML vs. XHTML syntax

Contenu connexe

Tendances

VB.NET:An introduction to Namespaces in .NET framework
VB.NET:An introduction to  Namespaces in .NET frameworkVB.NET:An introduction to  Namespaces in .NET framework
VB.NET:An introduction to Namespaces in .NET framework
Richa Handa
 
Xhtml
XhtmlXhtml
Dynamic HTML (DHTML)
Dynamic HTML (DHTML)Dynamic HTML (DHTML)
Dynamic HTML (DHTML)
Himanshu Kumar
 
HTML
HTMLHTML
Html presentation
Html presentationHtml presentation
Html presentation
Amber Bhaumik
 
javascript objects
javascript objectsjavascript objects
javascript objects
Vijay Kalyan
 
Html basics
Html basicsHtml basics
Html basics
mcatahir947
 
cascading style sheet ppt
cascading style sheet pptcascading style sheet ppt
cascading style sheet ppt
abhilashagupta
 
Intro to HTML (Kid's Class at TIY)
Intro to HTML (Kid's Class at TIY)Intro to HTML (Kid's Class at TIY)
Intro to HTML (Kid's Class at TIY)
Marjorie Sample
 
Web development using html 5
Web development using html 5Web development using html 5
Web development using html 5
Anjan Mahanta
 
HTML Fundamentals
HTML FundamentalsHTML Fundamentals
HTML Fundamentals
BG Java EE Course
 
Wrapper classes
Wrapper classes Wrapper classes
Introduction To Web Technology
Introduction To Web TechnologyIntroduction To Web Technology
Introduction To Web Technology
Arun Kumar
 
HTML5 DRAG AND DROP
HTML5 DRAG AND DROPHTML5 DRAG AND DROP
HTML5 DRAG AND DROP
Framgia Vietnam
 
Web design - Working with forms in HTML
Web design - Working with forms in HTMLWeb design - Working with forms in HTML
Web design - Working with forms in HTML
Mustafa Kamel Mohammadi
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
Ravinder Kamboj
 
Html forms
Html formsHtml forms
Html forms
eShikshak
 
Intro to html 5
Intro to html 5Intro to html 5
Intro to html 5
Ian Jasper Mangampo
 
Css lecture notes
Css lecture notesCss lecture notes
Css lecture notes
Santhiya Grace
 
Learning Html
Learning HtmlLearning Html
Learning Html
Damian Gonz
 

Tendances (20)

VB.NET:An introduction to Namespaces in .NET framework
VB.NET:An introduction to  Namespaces in .NET frameworkVB.NET:An introduction to  Namespaces in .NET framework
VB.NET:An introduction to Namespaces in .NET framework
 
Xhtml
XhtmlXhtml
Xhtml
 
Dynamic HTML (DHTML)
Dynamic HTML (DHTML)Dynamic HTML (DHTML)
Dynamic HTML (DHTML)
 
HTML
HTMLHTML
HTML
 
Html presentation
Html presentationHtml presentation
Html presentation
 
javascript objects
javascript objectsjavascript objects
javascript objects
 
Html basics
Html basicsHtml basics
Html basics
 
cascading style sheet ppt
cascading style sheet pptcascading style sheet ppt
cascading style sheet ppt
 
Intro to HTML (Kid's Class at TIY)
Intro to HTML (Kid's Class at TIY)Intro to HTML (Kid's Class at TIY)
Intro to HTML (Kid's Class at TIY)
 
Web development using html 5
Web development using html 5Web development using html 5
Web development using html 5
 
HTML Fundamentals
HTML FundamentalsHTML Fundamentals
HTML Fundamentals
 
Wrapper classes
Wrapper classes Wrapper classes
Wrapper classes
 
Introduction To Web Technology
Introduction To Web TechnologyIntroduction To Web Technology
Introduction To Web Technology
 
HTML5 DRAG AND DROP
HTML5 DRAG AND DROPHTML5 DRAG AND DROP
HTML5 DRAG AND DROP
 
Web design - Working with forms in HTML
Web design - Working with forms in HTMLWeb design - Working with forms in HTML
Web design - Working with forms in HTML
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
 
Html forms
Html formsHtml forms
Html forms
 
Intro to html 5
Intro to html 5Intro to html 5
Intro to html 5
 
Css lecture notes
Css lecture notesCss lecture notes
Css lecture notes
 
Learning Html
Learning HtmlLearning Html
Learning Html
 

En vedette

HTML Web design english & sinhala mix note
HTML Web design english & sinhala mix noteHTML Web design english & sinhala mix note
HTML Web design english & sinhala mix note
Mahinda Gamage
 
html5.ppt
html5.ppthtml5.ppt
html5.ppt
Niharika Gupta
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
MayaLisa
 
Html starting
Html startingHtml starting
Html starting
Rahul Dihora
 
HTML & CSS
HTML & CSSHTML & CSS
HTML & CSS
jlinabary
 
Websockets on the JVM: Atmosphere to the rescue!
Websockets on the JVM: Atmosphere to the rescue!Websockets on the JVM: Atmosphere to the rescue!
Websockets on the JVM: Atmosphere to the rescue!
jfarcand
 
XHTML
XHTMLXHTML
Html 5
Html 5Html 5
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
Singsys Pte Ltd
 
Intr To Html & Xhtml
Intr To Html & XhtmlIntr To Html & Xhtml
C++ in sinhala
C++ in sinhalaC++ in sinhala
C++ in sinhala
Uditha Kekulawala
 
Introduction to XHTML
Introduction to XHTMLIntroduction to XHTML
Introduction to XHTML
Hend Al-Khalifa
 
Xhtml
XhtmlXhtml
6. таблицы и другие теги html
6. таблицы и другие теги html6. таблицы и другие теги html
6. таблицы и другие теги html
Sergei Dubrov
 
CSS Lessons Learned the Hard Way (Generate Conf)
CSS Lessons Learned the Hard Way (Generate Conf)CSS Lessons Learned the Hard Way (Generate Conf)
CSS Lessons Learned the Hard Way (Generate Conf)
Zoe Gillenwater
 
Таблицы Html
Таблицы HtmlТаблицы Html
Таблицы Html
Vasya Petrov
 
Organisation and navigation
Organisation and navigationOrganisation and navigation
Organisation and navigation
Lon Barfield
 
How Joomla Works
How Joomla WorksHow Joomla Works
How Joomla Works
Amit Kumar Singh
 

En vedette (20)

HTML Web design english & sinhala mix note
HTML Web design english & sinhala mix noteHTML Web design english & sinhala mix note
HTML Web design english & sinhala mix note
 
Css sinhala(By Prasanga Amila-UCSC)
Css sinhala(By Prasanga Amila-UCSC)Css sinhala(By Prasanga Amila-UCSC)
Css sinhala(By Prasanga Amila-UCSC)
 
Html sinhala(By Prasanga Amila-UCSC)
Html sinhala(By Prasanga Amila-UCSC)Html sinhala(By Prasanga Amila-UCSC)
Html sinhala(By Prasanga Amila-UCSC)
 
html5.ppt
html5.ppthtml5.ppt
html5.ppt
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Html starting
Html startingHtml starting
Html starting
 
HTML & CSS
HTML & CSSHTML & CSS
HTML & CSS
 
Websockets on the JVM: Atmosphere to the rescue!
Websockets on the JVM: Atmosphere to the rescue!Websockets on the JVM: Atmosphere to the rescue!
Websockets on the JVM: Atmosphere to the rescue!
 
XHTML
XHTMLXHTML
XHTML
 
Html 5
Html 5Html 5
Html 5
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
 
Intr To Html & Xhtml
Intr To Html & XhtmlIntr To Html & Xhtml
Intr To Html & Xhtml
 
C++ in sinhala
C++ in sinhalaC++ in sinhala
C++ in sinhala
 
Introduction to XHTML
Introduction to XHTMLIntroduction to XHTML
Introduction to XHTML
 
Xhtml
XhtmlXhtml
Xhtml
 
6. таблицы и другие теги html
6. таблицы и другие теги html6. таблицы и другие теги html
6. таблицы и другие теги html
 
CSS Lessons Learned the Hard Way (Generate Conf)
CSS Lessons Learned the Hard Way (Generate Conf)CSS Lessons Learned the Hard Way (Generate Conf)
CSS Lessons Learned the Hard Way (Generate Conf)
 
Таблицы Html
Таблицы HtmlТаблицы Html
Таблицы Html
 
Organisation and navigation
Organisation and navigationOrganisation and navigation
Organisation and navigation
 
How Joomla Works
How Joomla WorksHow Joomla Works
How Joomla Works
 

Similaire à Origins and evolution of HTML and XHTML

BITM3730Week1.pptx
BITM3730Week1.pptxBITM3730Week1.pptx
BITM3730Week1.pptx
MattMarino13
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
Jonathan Arroyo
 
HTML & CSS.ppt
HTML & CSS.pptHTML & CSS.ppt
HTML & CSS.ppt
vaseemshaik21
 
Html
HtmlHtml
Intr to-html-xhtml-1233508169541646-3
Intr to-html-xhtml-1233508169541646-3Intr to-html-xhtml-1233508169541646-3
Intr to-html-xhtml-1233508169541646-3
bluejayjunior
 
Lecture 2 introduction to html
Lecture 2  introduction to htmlLecture 2  introduction to html
Lecture 2 introduction to html
palhaftab
 
Eye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easilyEye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easily
shabab shihan
 
3 1-html-fundamentals-110302100520-phpapp02
3 1-html-fundamentals-110302100520-phpapp023 1-html-fundamentals-110302100520-phpapp02
3 1-html-fundamentals-110302100520-phpapp02
Aditya Varma
 
Web Design-III IT.ppt
Web Design-III IT.pptWeb Design-III IT.ppt
Web Design-III IT.ppt
banu236831
 
SEO Training in Noida- Skyinfotech.in
SEO Training in Noida- Skyinfotech.inSEO Training in Noida- Skyinfotech.in
SEO Training in Noida- Skyinfotech.in
Sky Infotech
 
Introduction to html course digital markerters
Introduction to html course digital markertersIntroduction to html course digital markerters
Introduction to html course digital markerters
SEO SKills
 
Unit 2 (html)
Unit 2  (html)Unit 2  (html)
Unit 2 (html)
manochitra10
 
html
htmlhtml
html
tumetr1
 
Web technologies-course 02.pptx
Web technologies-course 02.pptxWeb technologies-course 02.pptx
Web technologies-course 02.pptx
Stefan Oprea
 
Web Design.ppt
Web Design.pptWeb Design.ppt
Web Design.ppt
Dr.R.SUGANYA RENGARAJ
 
WT Module-1.pdf
WT Module-1.pdfWT Module-1.pdf
WT Module-1.pdf
RamyaH11
 
4. html css-java script-basics
4. html css-java script-basics4. html css-java script-basics
4. html css-java script-basics
xu fag
 
4. html css-java script-basics
4. html css-java script-basics4. html css-java script-basics
4. html css-java script-basics
Nikita Garg
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
Aiman Hud
 
4. html css-java script-basics
4. html css-java script-basics4. html css-java script-basics
4. html css-java script-basics
Minea Chem
 

Similaire à Origins and evolution of HTML and XHTML (20)

BITM3730Week1.pptx
BITM3730Week1.pptxBITM3730Week1.pptx
BITM3730Week1.pptx
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
HTML & CSS.ppt
HTML & CSS.pptHTML & CSS.ppt
HTML & CSS.ppt
 
Html
HtmlHtml
Html
 
Intr to-html-xhtml-1233508169541646-3
Intr to-html-xhtml-1233508169541646-3Intr to-html-xhtml-1233508169541646-3
Intr to-html-xhtml-1233508169541646-3
 
Lecture 2 introduction to html
Lecture 2  introduction to htmlLecture 2  introduction to html
Lecture 2 introduction to html
 
Eye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easilyEye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easily
 
3 1-html-fundamentals-110302100520-phpapp02
3 1-html-fundamentals-110302100520-phpapp023 1-html-fundamentals-110302100520-phpapp02
3 1-html-fundamentals-110302100520-phpapp02
 
Web Design-III IT.ppt
Web Design-III IT.pptWeb Design-III IT.ppt
Web Design-III IT.ppt
 
SEO Training in Noida- Skyinfotech.in
SEO Training in Noida- Skyinfotech.inSEO Training in Noida- Skyinfotech.in
SEO Training in Noida- Skyinfotech.in
 
Introduction to html course digital markerters
Introduction to html course digital markertersIntroduction to html course digital markerters
Introduction to html course digital markerters
 
Unit 2 (html)
Unit 2  (html)Unit 2  (html)
Unit 2 (html)
 
html
htmlhtml
html
 
Web technologies-course 02.pptx
Web technologies-course 02.pptxWeb technologies-course 02.pptx
Web technologies-course 02.pptx
 
Web Design.ppt
Web Design.pptWeb Design.ppt
Web Design.ppt
 
WT Module-1.pdf
WT Module-1.pdfWT Module-1.pdf
WT Module-1.pdf
 
4. html css-java script-basics
4. html css-java script-basics4. html css-java script-basics
4. html css-java script-basics
 
4. html css-java script-basics
4. html css-java script-basics4. html css-java script-basics
4. html css-java script-basics
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
4. html css-java script-basics
4. html css-java script-basics4. html css-java script-basics
4. html css-java script-basics
 

Dernier

BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 

Dernier (20)

BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.Types of Herbal Cosmetics its standardization.
Types of Herbal Cosmetics its standardization.
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 

Origins and evolution of HTML and XHTML

  • 1. Lecture 5 HTML Boriana Koleva Room: C54 Email: bnk@cs.nott.ac.uk
  • 2. Overview  Origins and evolution of HTML and XHTML  Basic Syntax  Standard document structure  Basic text markup  Images  Hypertext links  Lists
  • 3. Origins and Evolution of HTML  Hypertext Markup Language  Developed for the delivery of hypertext on the WWW  Built using SGML  ASCII “Markup Language”
  • 4. Recent Versions  HTML 4.0 – 1997 • Introduced many new features and deprecated many older features  HTML 4.01 - 1999 - A cleanup of 4.0  XHTML 1.0 - 2000 • Just 4.01 defined using XML, instead of SGML  XHTML 1.1 – 2001 • Modularized 1.0, and drops frames  XHTML 2.0 – development abandoned  HTML 5.0 • Working Draft (not a W3C Recommendation yet) • HTML and XHTML syntax
  • 5. HTML versus XHTML  HTML has lax syntax rules, leading to sloppy and sometime ambiguous documents  XHTML syntax is much more strict, leading to clean and clear documents in a standard form  Even minor syntax errors will prevent a document labelled as XML from being rendered fully, whereas they would be ignored in the HTML syntax  HTML compatible with most legacy Web browsers
  • 6. Editing (X)HTML  Creating HTML documents • Text editors (e.g. Notepad, Emacs, Crimson Editor) • Source code editors (e.g. Notepad++, WebTide) • Authoring tools (e.g. Microsoft Expression Web, Adobe Dreamwaver, KompoZer)  HTML files have .html extension  The filename of your homepage should be index.html • If a browser does not request a specific file in a directory, normal Web server response is to return index.html • http://www.crg.cs.nott.ac.uk/~bnk/Teaching/WPS/
  • 7. Basic Syntax  Elements are defined by tags (markers)  Tag format: • Opening tag: <name> • Closing tag: </name>  The opening tag and its closing tag together specify a container for the content they enclose • E.g. <p> Hello </p>  Not all tags have content • E.g. <hr>
  • 8. Basic Syntax 2  The container and its content together are called an element  If a tag has attributes, they appear between its name and the right bracket of the opening tag • E.g. <img src = “c10.jpg” />  Comment form: <!-- … -->  Browsers ignore comments, unrecognizable tags, line breaks, multiple spaces, and tabs  Tags are just suggestions to the browser, even if they are recognized by the browser
  • 9. HTML Document Structure  An HTML document is composed of 3 parts: 1. a line containing HTML version information, e.g.: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> Note: <!DOCTYPE html> for HTML5 2. a declarative header section • Delimited with the <head> tag • The <title>tag is used to give the document a title • normally displayed in the browser’s window title bar 3. a body containing the document's actual content • Delimited with the <body> tag  After document type declaration, the remainder of an HTML document is contained by the html element
  • 10. Basic HTML Document <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title> … </title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" > </head> <body> … </body> </html>
  • 11. Basic Text Markup  Paragraph Elements: <p> • Text is normally placed in paragraph elements • The browser puts as many words of the paragraph’s content as will fit in each line <p> Greetings! </p> • Simple HTML example http://www.cs.nott.ac.uk/~bnk/WPS/simple.html
  • 12. Basic Text Markup 2  Line breaks: <br>  Horizontal rules: <hr>  Headings • Six sizes, 1 - 6, specified with <h1> to <h6> • 1, 2, and 3 use font sizes that are larger than the default font size • 4 uses the default size • 5 and 6 use smaller font sizes • Headings example http://www.cs.nott.ac.uk/~bnk/WPS/headings.html
  • 13. Basic Text Markup 3  Blockquotes: <blockquote> • To set a block of text off from the normal flow and appearance of text • Browsers often indent, and sometimes italicize http://www.cs.nott.ac.uk/~bnk/WPS/blockquote.html  Font Styles and Sizes (can be nested) • Boldface: <b> • Italics: <i> • Smaller: <small> • Larger: <big> (not supported in HTML5) • Monospace: <tt> (not supported in HTML5)
  • 14. Basic Text Markup 4 Example: The <big> sleet <big> in <big> <i> Crete </i><br /> lies </big> completely </big> in </big> the street Display: The sleet in Crete lies completely in the street  Subscripts: <sub> Superscripts: <sup> Example: x<sub>2</sub><sup>3</sup> Display: x2 3
  • 15. Basic Text Markup 5  Character Entities the only named character entity references in HTML5
  • 16. Images  All modern web browsers can display images inline (i.e. embedded in the text)  GIF (Graphic Interchange Format) • 8-bit color (256 different colors)  JPEG (Joint Photographic Experts Group) • 24-bit colour (16 million different colours)  Portable Network Graphics (PNG) • Relatively new • Designed for transferring images on the Internet
  • 17. Images 2  Images are inserted into a document with the <img> tag with the src attribute  The alt attribute is required by HTML • (in HTML5 can be omitted when textual desc. not available ) • Non-graphical browsers • Browsers with images turned off <img src = “logo.jpg" alt = “University of Nottingham Logo" />  The <img> tag has other optional attributes, including width and height (in pixels) http://www.cs.nott.ac.uk/~bnk/WPS/image.html
  • 18. Linking on the Web Document 1 Here is a link to document 2 Document 2 This is document 2. Anchor Link (reference) Destination Source
  • 19. Hypertext Links  Hypertext is the essence of the Web!  A link is specified with the href (hypertext reference) attribute of <a> (the anchor tag)  The content of <a> is the visual link in the document <a href=“target.html”>This is a link</a>  Relative addressing of targets is easier to maintain and more portable than absolute addressing http://www.cs.nott.ac.uk/~bnk/WPS/link.html
  • 20. Targets within Documents  If the target is not at the beginning of the document, the target spot must be marked  Target labels can be defined in many different tags with the id attribute <h1 id = "baskets"> Baskets </h1>  The link to an id must be preceded by a pound sign (#) • target is in the same document, <a href = "#baskets"> Baskets </a> • target is in a different document <a href = "myAd.html#baskets”> Baskets </a>
  • 21. Image Hyperlinks  Links can include images in their content <a href = "c210data.html“> <img src = "smallplane.jpg" alt = "Small picture of an airplane " > Info on C210 </a>
  • 22. Unordered Lists  The list is the content of the <ul> tag  List elements are the content of the <li> tag <h3> Some Common Single-Engine Aircraft </h3> <ul> <li> Cessna Skyhawk </li> <li> Beechcraft Bonanza </li> <li> Piper Cherokee </li> </ul>
  • 23. Ordered Lists  The list is the content of the <ol> tag  Each item in the display is preceded by a sequence value <h3> Cessna 210 Engine Starting Instructions </h3> <ol> <li> Set mixture to rich </li> <li> Set propeller to high RPM </li> <li> Set ignition switch to "BOTH" </li> <li> Set auxiliary fuel pump switch to "LOW PRIME" </li> <li> When fuel pressure reaches 2 to 2.5 PSI, push starter button </li> </ol>
  • 24. Nested Lists  Any type list can be nested inside any type list  The nested list must be in a list item <ol> <li> Single-Engine Aircraft <ol> <li> Tail wheel </li> <li> Tricycle </li> </ol> <br> </li> <li> Dual-Engine Aircraft <ol> <li> Wing-mounted engines </li> <li> Push-pull fuselage-mounted engines </li> </ol> </li> </ol> http://www.cs.nott.ac.uk/~bnk/WPS/nested_lists.html
  • 25. Definition Lists (for glossaries)  List is the content of the <dl> tag  Terms being defined are the content of the <dt> tag  The definitions themselves are the content of the <dd> tag <dl> <dt> 152 </dt> <dd> Two-place trainer </dd> <dt> 172 </dt> <dd> Smaller four-place airplane </dd </dl> http://www.cs.nott.ac.uk/~bnk/WPS/definition.html
  • 26. Validation  W3C HTML Validation Service • http://validator.w3.org/
  • 27. Syntactic Differences between HTML & XHTML  Case sensitivity  Closing tags  Quoted attribute values  Explicit attribute values  id and name attributes  Element nesting
  • 28. Summary  Origins and evolution of HTML and XHTML  Basic syntax and standard document structure  Basic text markup  Images  Hypertext links  Lists (unordered, ordered, definition)  Validation  HTML vs. XHTML syntax