SlideShare a Scribd company logo
1 of 52
Principles of Web Design
5th Edition
Chapter One
HTML and the Modern Web
Objectives
In this chapter, you will learn about:
 Creating Web pages with HTML
 The history of HTML
 Working with HTML5
 Choosing an HTML editor
 Using good coding practices
2
Principles of Web Design 5th Ed.
Creating Web Pages with HTML
• HTML is a markup language that lets you identify
common sections of a Web page
• Markup elements define each section
• This <h1> element defines text as a first-level
heading:
<h1>What is HTML?</h1>
3
Principles of Web Design 5th Ed.
Creating Web Pages with HTML
4
Principles of Web Design 5th Ed.
Structure of a Basic Web Page
• The HTML file contains content text and HTML
markup
• The HTML markup does not appear in the browser
• The browser interprets the code and displays the
results
5
Principles of Web Design 5th Ed.
6
Principles of Web Design 5th Ed.
Structure of a Basic Web Page
• The document type, or doctype for short, specifies
the rules for the document language
• The <html> tag is the root element
• The two main sections are the <head> and <body>
elements
• The head section is the container for all of the
descriptive information about the document
• The <body> section includes the content that the
user sees in the browser window
7
Principles of Web Design 5th Ed.
Structure of a Basic Web Page
• The body of the document can contain:
– Text
– Images
– Video content
– Audio content
– Forms for gathering information
– Interactive content
– Links to other Web resources
8
Principles of Web Design 5th Ed.
HTML in the Browser
• The browser interprets the HTML markup elements
and displays the results, hiding the actual markup
from the user
• Each browser interprets HTML in its own way,
based on its rendering engine
• It is essential that you test your work in different
Web browsers
9
Principles of Web Design 5th Ed.
10
Principles of Web Design 5th Ed.
Adding Style with CSS
• Web designers use Cascading Style Sheets (CSS)
to add presentation information to Web pages
• With CSS you can display information for different
devices
• With style sheets, the presentation properties are
separate from the content
• CSS lets you control the presentation
characteristics of an entire Web site with a single
style sheet
11
Principles of Web Design 5th Ed.
12
Principles of Web Design 5th Ed.
Adding Style with CSS
• The next two figures show CSS style rules and the
result in the browser
• The style rules in Figure 1-5 specify that the body
text for the page will be Arial, the h1 will have a
bottom border, and the paragraph will have a 30-
pixel left margin.
• Figure 1-6 shows the results in Firefox
13
Principles of Web Design 5th Ed.
14
Principles of Web Design 5th Ed.
15
Principles of Web Design 5th Ed.
Organizing Information with
Hypertext
• The World Wide Web links information on related
topics using hypertext
• You determine which terms to create as hypertext
links and where users end up when they click a link
• The different types of linked content and media
continually evolve
16
Principles of Web Design 5th Ed.
The History of HTML
• As a Web designer, you will encounter all types of
HTML coding practices
• Understanding the evolution of HTML will help you
understand various Web design methods
• To be a successful Web designer, you need to
understand the past, present, and future directions
of HTML, coding standards, and common practices
17
Principles of Web Design 5th Ed.
The History of HTML
• Tim Berners-Lee first proposed HTML at the
European Laboratory for Particle Physics (CERN)
in 1989
• Berners-Lee joined the ideas of the browser, a
markup language (HTML), and a communications
protocol that allowed hypertext linking
• Not only could people read documents, they could
easily create them using HTML
18
Principles of Web Design 5th Ed.
The History of HTML
• HTML is an application of the Standard
Generalized Markup Language (SGML), a standard
system for specifying document structure
• Berners-Lee joined the ideas of the user interface
(browser), a markup language (HTML), and a
communications protocol (http:) that allowed
hypertext linking
19
Principles of Web Design 5th Ed.
A Need for Standards
• The World Wide Web Consortium (W3C) was
founded in 1994 MIT
• The World Wide Web Consortium sets standards
for HTML and other markup languages
• Jointly developed standards, rather than ones
dictated by one vendor, benefit everyone
20
Principles of Web Design 5th Ed.
A Need for Standards
21
Principles of Web Design 5th Ed.
XML and XHTML – A New Direction
• In 1997, the W3C released XML, the Extensible
Markup Language
• XML is essential to creating applications for the
Web
• XML lets developers define their own markup
language
• XML has a stricter syntax than HTML
22
Principles of Web Design 5th Ed.
XML Syntax Rules
• Documents must be well-formed
• All tags must nest properly and not overlap
• Use all lowercase for element names
• Always use closing tags
• Empty elements are signified by a closing slash
• Attribute values must be contained in quotation
marks
23
Principles of Web Design 5th Ed.
Sample XML
<poem>
<title>An Ode to the Web</title>
<stanza>
<line>So many Web sites</line>
<line>So little time</line>
<line>And all I want to do</line>
<line>Is critique their design!</line>
</stanza>
</poem>
24
Principles of Web Design 5th Ed.
XML and XHTML – A New Direction
• XML syntax provides a solution to the problem of
widely varying HTML coding standards
• The W3C combined XML and HTML to create
XHTML
• XHTML follows the rules of XML
• Web developers readily adopted XHTML and CSS
to standardize coding
• Many Web sites benefited from leaner
standardized code
25
Principles of Web Design 5th Ed.
Problems with XHTML
• Relaxed syntax rules still must be applied because
of legacy code
• Newer versions of XHTML moved too far away
from existing Web development
• XHTML was not well received by the development
community
26
Principles of Web Design 5th Ed.
A Proposal for HTML5
• The Web Hypertext Application Technology
Working Group (WHATWG) proposed HTML5
• HTML5:
– Supports standards-based coding
– Compatible with HTML and XHTML
– Compatible with CSS
– Supports new page layout elements
– Application and media compatible
27
Principles of Web Design 5th Ed.
Working with HTML5
• HTML5 attempts to address shortcomings of HTML
• Addresses needs of modern Web design
• Offers new features:
– Logical layout elements
– Rich media
– Support for applications
• Removes old features:
– All display elements have been removed in favor of
CSS
– Framesets are gone
28
Principles of Web Design 5th Ed.
Working with HTML5
HTML5 offers two syntaxes:
– An HTML-compatible syntax
– An XML-compatible syntax
• HTML-compatible syntax
– More relaxed syntax
– Code shortcuts allowed
• XML-compatible syntax
– Consistent with XHTML
– Uses XML syntax rules
29
Principles of Web Design 5th Ed.
Working with HTML5
30
Principles of Web Design 5th Ed.
Working with HTML5
31
Principles of Web Design 5th Ed.
Choosing the Correct Syntax
• HTML5 allows a mixture of these two types of
syntax into one document
• A polyglot document: mixed language
• Use XML coding standards in your HTML
documents
• Lets you create standardized, compatible code
32
Principles of Web Design 5th Ed.
Choosing the Correct doctype
• Always use a doctype statement
• Using a doctype forces the browser to display in
standards mode
• The standard doctype statement for HTML5:
<!DOCTYPE html>
33
Principles of Web Design 5th Ed.
Choosing the Correct MIME type
• Multipurpose Internet Mail Extensions (MIME)
defines content types for the Web
• Determines the type of document
• Declared in a <meta> element in the <head>
section
• Also contains a character set identifier
• Your <meta> element should look like this:
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8">
34
Principles of Web Design 5th Ed.
Creating Syntactically Correct Code
• Documents must be well-formed
• All tags must nest properly and not overlap
• Use all lowercase for element names
• Always use closing tags
• Empty elements are marked with a closing slash
• Attribute values must be contained in quotation
marks
35
Principles of Web Design 5th Ed.
HTML5 Element Categories
• Metadata content
• Flow content
• Sectioning root
• Sectioning content
• Heading content
• Phrasing content
• Embedded content
• Interactive content
• Transparent
36
Principles of Web Design 5th Ed.
New Elements in HTML5
• HTML5 has a number of new elements; see Table
1-2 in the text
• Not all elements are supported by current browsers
• Test new elements carefully
37
Principles of Web Design 5th Ed.
Attributes in HTML5
• Elements can contain attributes that set properties
• Earlier versions of HTML had more attributes
• HTML5 has less attributes because of CSS
• Global attributes can be applied to any element
38
Principles of Web Design 5th Ed.
Obsolete Elements in HTML5
• Many elements have been removed in HTML,
mostly involving presentation effects
• Framesets are no longer available
39
Principles of Web Design 5th Ed.
Using HTML5 Elements for
Page Structure
• Most Web pages contain common characteristics:
– Header
– Navigation
– Articles
– Figures
– Footers
– Sidebars
• These are currently marked up with <div> elements
and id or class names
40
Principles of Web Design 5th Ed.
41
Principles of Web Design 5th Ed.
• HTML5 offers a new set of elements for describing
document structure
• HTML5 replaces the use of <div> with named
elements to structure the page
• The <article> element can be used instead of the
<div> element, for example:
<article>This is the main content of
the Web page</article>
Using HTML5 Elements for
Page Structure
42
Principles of Web Design 5th Ed.
Using HTML5 Elements for
Page Structure
• The HTML5 elements for page layout include:
– <header> Contains the page header content
– <nav> Contains the navigation elements for the
page
– <article> Contains the primary page content
– <section> Defines sections or groupings of page
content
– <aside> Contains additional content such as a quote
or sidebar
– <figure> Contains images for the article content
– <footer> Contains page footer content
43
Principles of Web Design 5th Ed.
Interactive Capabilities in HTML5
• Audio and video
• Drawing canvas
• Background application processing
• Local data storage
44
Principles of Web Design 5th Ed.
Choosing an HTML Editor
• Editors are either code-based or WYSIWYG (What
You See is What You Get)
• Some editors offer both methods
• Many editors offer built-in code validators and FTP
clients
• You can find low-cost freeware or shareware
editors
• You can also use a text editor to create Web pages
45
Principles of Web Design 5th Ed.
Choosing an HTML Editor
• HTML editors contain their own logic for
interpreting code
• Make sure to check your work in multiple browsers
• Some editors create overly complex code
46
Principles of Web Design 5th Ed.
Using Good Coding Practices
• Creating code that ensures the greatest standards-
compliance, presentation, and usefulness of your
content
– Stick to the standards
– Use semantic markup
– Validate your code
47
Principles of Web Design 5th Ed.
Stick to the Standards
• Stick to the W3C standards
• Separate content from presentation
• Plan to be accessible to different devices
• Standardized design is more accessible
48
Principles of Web Design 5th Ed.
Use Semantic Markup
• Semantic markup identifies the intended use of
document sections
• Accurately describes each piece of content
• Until recently, this logical use of the HTML
elements was largely ignored
• Document elements match the meaning and usage
of the document sections: <p> for paragraph, <h1>
for top-level heading, and so on
49
Principles of Web Design 5th Ed.
Validate Your Code
• Valid code conforms to the usage rules of the W3C
• The lack of valid code is a major problem
• Valid code enhances browser compatibility,
accessibility, and exchange of data
• The most common mistakes include:
– No doctype declaration
– Missing closing tags
– Missing alt attributes in <img> elements
– Incorrect tag nesting
– Unquoted attributes
50
Principles of Web Design 5th Ed.
Migrating from Legacy HTML to
HTML5
• The transition should be a gradual process
• Clean up code on existing pages
• Plan coding conventions for new pages, removing
deprecated elements
• Move display information to CSS
• Test for backwards compatibility
51
Principles of Web Design 5th Ed.
Summary
• Make sure to check for support of new HTML5
elements, and test carefully before adding them to
your Web site
• Use the HTML5 naming conventions to name the
content sections of your site even if only using
them as class or id names
• Use Cascading Style Sheets
• Decide whether to code to the XML standard
• Use good coding practices
52
Principles of Web Design 5th Ed.

More Related Content

Similar to 9781111528705_PPT_ch014.pptx

Similar to 9781111528705_PPT_ch014.pptx (20)

Html vs xhtml
Html vs xhtmlHtml vs xhtml
Html vs xhtml
 
Html5
Html5 Html5
Html5
 
HTML Demo.ppt
HTML Demo.pptHTML Demo.ppt
HTML Demo.ppt
 
WT Module-1.pdf
WT Module-1.pdfWT Module-1.pdf
WT Module-1.pdf
 
Ddpz2613 topic1 introduction
Ddpz2613 topic1 introductionDdpz2613 topic1 introduction
Ddpz2613 topic1 introduction
 
HTML.pptx
HTML.pptxHTML.pptx
HTML.pptx
 
Web design - HTML (Hypertext Markup Language) introduction
Web design - HTML (Hypertext Markup Language) introductionWeb design - HTML (Hypertext Markup Language) introduction
Web design - HTML (Hypertext Markup Language) introduction
 
Dhtml ppt (2)
Dhtml ppt (2)Dhtml ppt (2)
Dhtml ppt (2)
 
Web Design
Web DesignWeb Design
Web Design
 
Chapter 1 Getting Started with HTML5
Chapter 1 Getting Started with HTML5Chapter 1 Getting Started with HTML5
Chapter 1 Getting Started with HTML5
 
HTML Intro
HTML IntroHTML Intro
HTML Intro
 
Fii Practic Frontend BeeNear - laborator 1
Fii Practic Frontend BeeNear - laborator 1Fii Practic Frontend BeeNear - laborator 1
Fii Practic Frontend BeeNear - laborator 1
 
Developing Website.pptx
Developing Website.pptxDeveloping Website.pptx
Developing Website.pptx
 
Html
HtmlHtml
Html
 
Unit 01 (1).pdf
Unit 01 (1).pdfUnit 01 (1).pdf
Unit 01 (1).pdf
 
wt mod1.pdf
wt mod1.pdfwt mod1.pdf
wt mod1.pdf
 
Web design using html
Web design using htmlWeb design using html
Web design using html
 
9781111528705_PPT_ch03.ppt
9781111528705_PPT_ch03.ppt9781111528705_PPT_ch03.ppt
9781111528705_PPT_ch03.ppt
 
Web development using HTML and CSS
Web development using HTML and CSSWeb development using HTML and CSS
Web development using HTML and CSS
 
Class1slides
Class1slidesClass1slides
Class1slides
 

More from SimonChirambira

9781111528705_PPT_ch07.ppt
9781111528705_PPT_ch07.ppt9781111528705_PPT_ch07.ppt
9781111528705_PPT_ch07.pptSimonChirambira
 
9781111528705_PPT_ch09.ppt
9781111528705_PPT_ch09.ppt9781111528705_PPT_ch09.ppt
9781111528705_PPT_ch09.pptSimonChirambira
 
9781111528705_PPT_ch11.ppt
9781111528705_PPT_ch11.ppt9781111528705_PPT_ch11.ppt
9781111528705_PPT_ch11.pptSimonChirambira
 
9781111528705_PPT_ch08.ppt
9781111528705_PPT_ch08.ppt9781111528705_PPT_ch08.ppt
9781111528705_PPT_ch08.pptSimonChirambira
 
9781111528705_PPT_ch05.ppt
9781111528705_PPT_ch05.ppt9781111528705_PPT_ch05.ppt
9781111528705_PPT_ch05.pptSimonChirambira
 
9781111528705_PPT_ch012.pptx
9781111528705_PPT_ch012.pptx9781111528705_PPT_ch012.pptx
9781111528705_PPT_ch012.pptxSimonChirambira
 
9781111528705_PPT_ch013.pptx
9781111528705_PPT_ch013.pptx9781111528705_PPT_ch013.pptx
9781111528705_PPT_ch013.pptxSimonChirambira
 
9781111528705_PPT_ch10.ppt
9781111528705_PPT_ch10.ppt9781111528705_PPT_ch10.ppt
9781111528705_PPT_ch10.pptSimonChirambira
 
9781111528705_PPT_ch01.pptx
9781111528705_PPT_ch01.pptx9781111528705_PPT_ch01.pptx
9781111528705_PPT_ch01.pptxSimonChirambira
 

More from SimonChirambira (9)

9781111528705_PPT_ch07.ppt
9781111528705_PPT_ch07.ppt9781111528705_PPT_ch07.ppt
9781111528705_PPT_ch07.ppt
 
9781111528705_PPT_ch09.ppt
9781111528705_PPT_ch09.ppt9781111528705_PPT_ch09.ppt
9781111528705_PPT_ch09.ppt
 
9781111528705_PPT_ch11.ppt
9781111528705_PPT_ch11.ppt9781111528705_PPT_ch11.ppt
9781111528705_PPT_ch11.ppt
 
9781111528705_PPT_ch08.ppt
9781111528705_PPT_ch08.ppt9781111528705_PPT_ch08.ppt
9781111528705_PPT_ch08.ppt
 
9781111528705_PPT_ch05.ppt
9781111528705_PPT_ch05.ppt9781111528705_PPT_ch05.ppt
9781111528705_PPT_ch05.ppt
 
9781111528705_PPT_ch012.pptx
9781111528705_PPT_ch012.pptx9781111528705_PPT_ch012.pptx
9781111528705_PPT_ch012.pptx
 
9781111528705_PPT_ch013.pptx
9781111528705_PPT_ch013.pptx9781111528705_PPT_ch013.pptx
9781111528705_PPT_ch013.pptx
 
9781111528705_PPT_ch10.ppt
9781111528705_PPT_ch10.ppt9781111528705_PPT_ch10.ppt
9781111528705_PPT_ch10.ppt
 
9781111528705_PPT_ch01.pptx
9781111528705_PPT_ch01.pptx9781111528705_PPT_ch01.pptx
9781111528705_PPT_ch01.pptx
 

Recently uploaded

Call Girls Aslali 7397865700 Ridhima Hire Me Full Night
Call Girls Aslali 7397865700 Ridhima Hire Me Full NightCall Girls Aslali 7397865700 Ridhima Hire Me Full Night
Call Girls Aslali 7397865700 Ridhima Hire Me Full Nightssuser7cb4ff
 
Untitled presedddddddddddddddddntation (1).pptx
Untitled presedddddddddddddddddntation (1).pptxUntitled presedddddddddddddddddntation (1).pptx
Untitled presedddddddddddddddddntation (1).pptxmapanig881
 
8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCR8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCRdollysharma2066
 
Call Girls In Safdarjung Enclave 24/7✡️9711147426✡️ Escorts Service
Call Girls In Safdarjung Enclave 24/7✡️9711147426✡️ Escorts ServiceCall Girls In Safdarjung Enclave 24/7✡️9711147426✡️ Escorts Service
Call Girls In Safdarjung Enclave 24/7✡️9711147426✡️ Escorts Servicejennyeacort
 
NO1 Famous Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Add...
NO1 Famous Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Add...NO1 Famous Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Add...
NO1 Famous Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Add...Amil baba
 
办理学位证(NUS证书)新加坡国立大学毕业证成绩单原版一比一
办理学位证(NUS证书)新加坡国立大学毕业证成绩单原版一比一办理学位证(NUS证书)新加坡国立大学毕业证成绩单原版一比一
办理学位证(NUS证书)新加坡国立大学毕业证成绩单原版一比一Fi L
 
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一F La
 
Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)
Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)
Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)jennyeacort
 
306MTAMount UCLA University Bachelor's Diploma in Social Media
306MTAMount UCLA University Bachelor's Diploma in Social Media306MTAMount UCLA University Bachelor's Diploma in Social Media
306MTAMount UCLA University Bachelor's Diploma in Social MediaD SSS
 
Housewife Call Girls NRI Layout - Call 7001305949 Rs-3500 with A/C Room Cash ...
Housewife Call Girls NRI Layout - Call 7001305949 Rs-3500 with A/C Room Cash ...Housewife Call Girls NRI Layout - Call 7001305949 Rs-3500 with A/C Room Cash ...
Housewife Call Girls NRI Layout - Call 7001305949 Rs-3500 with A/C Room Cash ...narwatsonia7
 
办理(UC毕业证书)查尔斯顿大学毕业证成绩单原版一比一
办理(UC毕业证书)查尔斯顿大学毕业证成绩单原版一比一办理(UC毕业证书)查尔斯顿大学毕业证成绩单原版一比一
办理(UC毕业证书)查尔斯顿大学毕业证成绩单原版一比一z xss
 
Introduction-to-Canva-and-Graphic-Design-Basics.pptx
Introduction-to-Canva-and-Graphic-Design-Basics.pptxIntroduction-to-Canva-and-Graphic-Design-Basics.pptx
Introduction-to-Canva-and-Graphic-Design-Basics.pptxnewslab143
 
ARt app | UX Case Study
ARt app | UX Case StudyARt app | UX Case Study
ARt app | UX Case StudySophia Viganò
 
Call In girls Bhikaji Cama Place 🔝 ⇛8377877756 FULL Enjoy Delhi NCR
Call In girls Bhikaji Cama Place 🔝 ⇛8377877756 FULL Enjoy Delhi NCRCall In girls Bhikaji Cama Place 🔝 ⇛8377877756 FULL Enjoy Delhi NCR
Call In girls Bhikaji Cama Place 🔝 ⇛8377877756 FULL Enjoy Delhi NCRdollysharma2066
 
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree 毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree ttt fff
 
Design Portfolio - 2024 - William Vickery
Design Portfolio - 2024 - William VickeryDesign Portfolio - 2024 - William Vickery
Design Portfolio - 2024 - William VickeryWilliamVickery6
 
Call Girls in Ashok Nagar Delhi ✡️9711147426✡️ Escorts Service
Call Girls in Ashok Nagar Delhi ✡️9711147426✡️ Escorts ServiceCall Girls in Ashok Nagar Delhi ✡️9711147426✡️ Escorts Service
Call Girls in Ashok Nagar Delhi ✡️9711147426✡️ Escorts Servicejennyeacort
 
Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025Rndexperts
 
(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一
(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一
(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一Fi sss
 
Architecture case study India Habitat Centre, Delhi.pdf
Architecture case study India Habitat Centre, Delhi.pdfArchitecture case study India Habitat Centre, Delhi.pdf
Architecture case study India Habitat Centre, Delhi.pdfSumit Lathwal
 

Recently uploaded (20)

Call Girls Aslali 7397865700 Ridhima Hire Me Full Night
Call Girls Aslali 7397865700 Ridhima Hire Me Full NightCall Girls Aslali 7397865700 Ridhima Hire Me Full Night
Call Girls Aslali 7397865700 Ridhima Hire Me Full Night
 
Untitled presedddddddddddddddddntation (1).pptx
Untitled presedddddddddddddddddntation (1).pptxUntitled presedddddddddddddddddntation (1).pptx
Untitled presedddddddddddddddddntation (1).pptx
 
8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCR8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCR
8377877756 Full Enjoy @24/7 Call Girls in Nirman Vihar Delhi NCR
 
Call Girls In Safdarjung Enclave 24/7✡️9711147426✡️ Escorts Service
Call Girls In Safdarjung Enclave 24/7✡️9711147426✡️ Escorts ServiceCall Girls In Safdarjung Enclave 24/7✡️9711147426✡️ Escorts Service
Call Girls In Safdarjung Enclave 24/7✡️9711147426✡️ Escorts Service
 
NO1 Famous Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Add...
NO1 Famous Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Add...NO1 Famous Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Add...
NO1 Famous Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi Add...
 
办理学位证(NUS证书)新加坡国立大学毕业证成绩单原版一比一
办理学位证(NUS证书)新加坡国立大学毕业证成绩单原版一比一办理学位证(NUS证书)新加坡国立大学毕业证成绩单原版一比一
办理学位证(NUS证书)新加坡国立大学毕业证成绩单原版一比一
 
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
办理(宾州州立毕业证书)美国宾夕法尼亚州立大学毕业证成绩单原版一比一
 
Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)
Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)
Call Us ✡️97111⇛47426⇛Call In girls Vasant Vihar༒(Delhi)
 
306MTAMount UCLA University Bachelor's Diploma in Social Media
306MTAMount UCLA University Bachelor's Diploma in Social Media306MTAMount UCLA University Bachelor's Diploma in Social Media
306MTAMount UCLA University Bachelor's Diploma in Social Media
 
Housewife Call Girls NRI Layout - Call 7001305949 Rs-3500 with A/C Room Cash ...
Housewife Call Girls NRI Layout - Call 7001305949 Rs-3500 with A/C Room Cash ...Housewife Call Girls NRI Layout - Call 7001305949 Rs-3500 with A/C Room Cash ...
Housewife Call Girls NRI Layout - Call 7001305949 Rs-3500 with A/C Room Cash ...
 
办理(UC毕业证书)查尔斯顿大学毕业证成绩单原版一比一
办理(UC毕业证书)查尔斯顿大学毕业证成绩单原版一比一办理(UC毕业证书)查尔斯顿大学毕业证成绩单原版一比一
办理(UC毕业证书)查尔斯顿大学毕业证成绩单原版一比一
 
Introduction-to-Canva-and-Graphic-Design-Basics.pptx
Introduction-to-Canva-and-Graphic-Design-Basics.pptxIntroduction-to-Canva-and-Graphic-Design-Basics.pptx
Introduction-to-Canva-and-Graphic-Design-Basics.pptx
 
ARt app | UX Case Study
ARt app | UX Case StudyARt app | UX Case Study
ARt app | UX Case Study
 
Call In girls Bhikaji Cama Place 🔝 ⇛8377877756 FULL Enjoy Delhi NCR
Call In girls Bhikaji Cama Place 🔝 ⇛8377877756 FULL Enjoy Delhi NCRCall In girls Bhikaji Cama Place 🔝 ⇛8377877756 FULL Enjoy Delhi NCR
Call In girls Bhikaji Cama Place 🔝 ⇛8377877756 FULL Enjoy Delhi NCR
 
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree 毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲弗林德斯大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
Design Portfolio - 2024 - William Vickery
Design Portfolio - 2024 - William VickeryDesign Portfolio - 2024 - William Vickery
Design Portfolio - 2024 - William Vickery
 
Call Girls in Ashok Nagar Delhi ✡️9711147426✡️ Escorts Service
Call Girls in Ashok Nagar Delhi ✡️9711147426✡️ Escorts ServiceCall Girls in Ashok Nagar Delhi ✡️9711147426✡️ Escorts Service
Call Girls in Ashok Nagar Delhi ✡️9711147426✡️ Escorts Service
 
Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025Top 10 Modern Web Design Trends for 2025
Top 10 Modern Web Design Trends for 2025
 
(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一
(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一
(办理学位证)埃迪斯科文大学毕业证成绩单原版一比一
 
Architecture case study India Habitat Centre, Delhi.pdf
Architecture case study India Habitat Centre, Delhi.pdfArchitecture case study India Habitat Centre, Delhi.pdf
Architecture case study India Habitat Centre, Delhi.pdf
 

9781111528705_PPT_ch014.pptx

  • 1. Principles of Web Design 5th Edition Chapter One HTML and the Modern Web
  • 2. Objectives In this chapter, you will learn about:  Creating Web pages with HTML  The history of HTML  Working with HTML5  Choosing an HTML editor  Using good coding practices 2 Principles of Web Design 5th Ed.
  • 3. Creating Web Pages with HTML • HTML is a markup language that lets you identify common sections of a Web page • Markup elements define each section • This <h1> element defines text as a first-level heading: <h1>What is HTML?</h1> 3 Principles of Web Design 5th Ed.
  • 4. Creating Web Pages with HTML 4 Principles of Web Design 5th Ed.
  • 5. Structure of a Basic Web Page • The HTML file contains content text and HTML markup • The HTML markup does not appear in the browser • The browser interprets the code and displays the results 5 Principles of Web Design 5th Ed.
  • 6. 6 Principles of Web Design 5th Ed.
  • 7. Structure of a Basic Web Page • The document type, or doctype for short, specifies the rules for the document language • The <html> tag is the root element • The two main sections are the <head> and <body> elements • The head section is the container for all of the descriptive information about the document • The <body> section includes the content that the user sees in the browser window 7 Principles of Web Design 5th Ed.
  • 8. Structure of a Basic Web Page • The body of the document can contain: – Text – Images – Video content – Audio content – Forms for gathering information – Interactive content – Links to other Web resources 8 Principles of Web Design 5th Ed.
  • 9. HTML in the Browser • The browser interprets the HTML markup elements and displays the results, hiding the actual markup from the user • Each browser interprets HTML in its own way, based on its rendering engine • It is essential that you test your work in different Web browsers 9 Principles of Web Design 5th Ed.
  • 10. 10 Principles of Web Design 5th Ed.
  • 11. Adding Style with CSS • Web designers use Cascading Style Sheets (CSS) to add presentation information to Web pages • With CSS you can display information for different devices • With style sheets, the presentation properties are separate from the content • CSS lets you control the presentation characteristics of an entire Web site with a single style sheet 11 Principles of Web Design 5th Ed.
  • 12. 12 Principles of Web Design 5th Ed.
  • 13. Adding Style with CSS • The next two figures show CSS style rules and the result in the browser • The style rules in Figure 1-5 specify that the body text for the page will be Arial, the h1 will have a bottom border, and the paragraph will have a 30- pixel left margin. • Figure 1-6 shows the results in Firefox 13 Principles of Web Design 5th Ed.
  • 14. 14 Principles of Web Design 5th Ed.
  • 15. 15 Principles of Web Design 5th Ed.
  • 16. Organizing Information with Hypertext • The World Wide Web links information on related topics using hypertext • You determine which terms to create as hypertext links and where users end up when they click a link • The different types of linked content and media continually evolve 16 Principles of Web Design 5th Ed.
  • 17. The History of HTML • As a Web designer, you will encounter all types of HTML coding practices • Understanding the evolution of HTML will help you understand various Web design methods • To be a successful Web designer, you need to understand the past, present, and future directions of HTML, coding standards, and common practices 17 Principles of Web Design 5th Ed.
  • 18. The History of HTML • Tim Berners-Lee first proposed HTML at the European Laboratory for Particle Physics (CERN) in 1989 • Berners-Lee joined the ideas of the browser, a markup language (HTML), and a communications protocol that allowed hypertext linking • Not only could people read documents, they could easily create them using HTML 18 Principles of Web Design 5th Ed.
  • 19. The History of HTML • HTML is an application of the Standard Generalized Markup Language (SGML), a standard system for specifying document structure • Berners-Lee joined the ideas of the user interface (browser), a markup language (HTML), and a communications protocol (http:) that allowed hypertext linking 19 Principles of Web Design 5th Ed.
  • 20. A Need for Standards • The World Wide Web Consortium (W3C) was founded in 1994 MIT • The World Wide Web Consortium sets standards for HTML and other markup languages • Jointly developed standards, rather than ones dictated by one vendor, benefit everyone 20 Principles of Web Design 5th Ed.
  • 21. A Need for Standards 21 Principles of Web Design 5th Ed.
  • 22. XML and XHTML – A New Direction • In 1997, the W3C released XML, the Extensible Markup Language • XML is essential to creating applications for the Web • XML lets developers define their own markup language • XML has a stricter syntax than HTML 22 Principles of Web Design 5th Ed.
  • 23. XML Syntax Rules • Documents must be well-formed • All tags must nest properly and not overlap • Use all lowercase for element names • Always use closing tags • Empty elements are signified by a closing slash • Attribute values must be contained in quotation marks 23 Principles of Web Design 5th Ed.
  • 24. Sample XML <poem> <title>An Ode to the Web</title> <stanza> <line>So many Web sites</line> <line>So little time</line> <line>And all I want to do</line> <line>Is critique their design!</line> </stanza> </poem> 24 Principles of Web Design 5th Ed.
  • 25. XML and XHTML – A New Direction • XML syntax provides a solution to the problem of widely varying HTML coding standards • The W3C combined XML and HTML to create XHTML • XHTML follows the rules of XML • Web developers readily adopted XHTML and CSS to standardize coding • Many Web sites benefited from leaner standardized code 25 Principles of Web Design 5th Ed.
  • 26. Problems with XHTML • Relaxed syntax rules still must be applied because of legacy code • Newer versions of XHTML moved too far away from existing Web development • XHTML was not well received by the development community 26 Principles of Web Design 5th Ed.
  • 27. A Proposal for HTML5 • The Web Hypertext Application Technology Working Group (WHATWG) proposed HTML5 • HTML5: – Supports standards-based coding – Compatible with HTML and XHTML – Compatible with CSS – Supports new page layout elements – Application and media compatible 27 Principles of Web Design 5th Ed.
  • 28. Working with HTML5 • HTML5 attempts to address shortcomings of HTML • Addresses needs of modern Web design • Offers new features: – Logical layout elements – Rich media – Support for applications • Removes old features: – All display elements have been removed in favor of CSS – Framesets are gone 28 Principles of Web Design 5th Ed.
  • 29. Working with HTML5 HTML5 offers two syntaxes: – An HTML-compatible syntax – An XML-compatible syntax • HTML-compatible syntax – More relaxed syntax – Code shortcuts allowed • XML-compatible syntax – Consistent with XHTML – Uses XML syntax rules 29 Principles of Web Design 5th Ed.
  • 30. Working with HTML5 30 Principles of Web Design 5th Ed.
  • 31. Working with HTML5 31 Principles of Web Design 5th Ed.
  • 32. Choosing the Correct Syntax • HTML5 allows a mixture of these two types of syntax into one document • A polyglot document: mixed language • Use XML coding standards in your HTML documents • Lets you create standardized, compatible code 32 Principles of Web Design 5th Ed.
  • 33. Choosing the Correct doctype • Always use a doctype statement • Using a doctype forces the browser to display in standards mode • The standard doctype statement for HTML5: <!DOCTYPE html> 33 Principles of Web Design 5th Ed.
  • 34. Choosing the Correct MIME type • Multipurpose Internet Mail Extensions (MIME) defines content types for the Web • Determines the type of document • Declared in a <meta> element in the <head> section • Also contains a character set identifier • Your <meta> element should look like this: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 34 Principles of Web Design 5th Ed.
  • 35. Creating Syntactically Correct Code • Documents must be well-formed • All tags must nest properly and not overlap • Use all lowercase for element names • Always use closing tags • Empty elements are marked with a closing slash • Attribute values must be contained in quotation marks 35 Principles of Web Design 5th Ed.
  • 36. HTML5 Element Categories • Metadata content • Flow content • Sectioning root • Sectioning content • Heading content • Phrasing content • Embedded content • Interactive content • Transparent 36 Principles of Web Design 5th Ed.
  • 37. New Elements in HTML5 • HTML5 has a number of new elements; see Table 1-2 in the text • Not all elements are supported by current browsers • Test new elements carefully 37 Principles of Web Design 5th Ed.
  • 38. Attributes in HTML5 • Elements can contain attributes that set properties • Earlier versions of HTML had more attributes • HTML5 has less attributes because of CSS • Global attributes can be applied to any element 38 Principles of Web Design 5th Ed.
  • 39. Obsolete Elements in HTML5 • Many elements have been removed in HTML, mostly involving presentation effects • Framesets are no longer available 39 Principles of Web Design 5th Ed.
  • 40. Using HTML5 Elements for Page Structure • Most Web pages contain common characteristics: – Header – Navigation – Articles – Figures – Footers – Sidebars • These are currently marked up with <div> elements and id or class names 40 Principles of Web Design 5th Ed.
  • 41. 41 Principles of Web Design 5th Ed.
  • 42. • HTML5 offers a new set of elements for describing document structure • HTML5 replaces the use of <div> with named elements to structure the page • The <article> element can be used instead of the <div> element, for example: <article>This is the main content of the Web page</article> Using HTML5 Elements for Page Structure 42 Principles of Web Design 5th Ed.
  • 43. Using HTML5 Elements for Page Structure • The HTML5 elements for page layout include: – <header> Contains the page header content – <nav> Contains the navigation elements for the page – <article> Contains the primary page content – <section> Defines sections or groupings of page content – <aside> Contains additional content such as a quote or sidebar – <figure> Contains images for the article content – <footer> Contains page footer content 43 Principles of Web Design 5th Ed.
  • 44. Interactive Capabilities in HTML5 • Audio and video • Drawing canvas • Background application processing • Local data storage 44 Principles of Web Design 5th Ed.
  • 45. Choosing an HTML Editor • Editors are either code-based or WYSIWYG (What You See is What You Get) • Some editors offer both methods • Many editors offer built-in code validators and FTP clients • You can find low-cost freeware or shareware editors • You can also use a text editor to create Web pages 45 Principles of Web Design 5th Ed.
  • 46. Choosing an HTML Editor • HTML editors contain their own logic for interpreting code • Make sure to check your work in multiple browsers • Some editors create overly complex code 46 Principles of Web Design 5th Ed.
  • 47. Using Good Coding Practices • Creating code that ensures the greatest standards- compliance, presentation, and usefulness of your content – Stick to the standards – Use semantic markup – Validate your code 47 Principles of Web Design 5th Ed.
  • 48. Stick to the Standards • Stick to the W3C standards • Separate content from presentation • Plan to be accessible to different devices • Standardized design is more accessible 48 Principles of Web Design 5th Ed.
  • 49. Use Semantic Markup • Semantic markup identifies the intended use of document sections • Accurately describes each piece of content • Until recently, this logical use of the HTML elements was largely ignored • Document elements match the meaning and usage of the document sections: <p> for paragraph, <h1> for top-level heading, and so on 49 Principles of Web Design 5th Ed.
  • 50. Validate Your Code • Valid code conforms to the usage rules of the W3C • The lack of valid code is a major problem • Valid code enhances browser compatibility, accessibility, and exchange of data • The most common mistakes include: – No doctype declaration – Missing closing tags – Missing alt attributes in <img> elements – Incorrect tag nesting – Unquoted attributes 50 Principles of Web Design 5th Ed.
  • 51. Migrating from Legacy HTML to HTML5 • The transition should be a gradual process • Clean up code on existing pages • Plan coding conventions for new pages, removing deprecated elements • Move display information to CSS • Test for backwards compatibility 51 Principles of Web Design 5th Ed.
  • 52. Summary • Make sure to check for support of new HTML5 elements, and test carefully before adding them to your Web site • Use the HTML5 naming conventions to name the content sections of your site even if only using them as class or id names • Use Cascading Style Sheets • Decide whether to code to the XML standard • Use good coding practices 52 Principles of Web Design 5th Ed.