SlideShare a Scribd company logo
1 of 61
Principles of Web Design
6th Edition
Chapter 1 – HTML5
Objectives
• Create web pages with HTML
• Add style with CSS
• Describe the history of HTML
• Work with HTML5
• Use good coding practices
2
Creating Web Pages with HTML
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>
4
5
HTML Syntax
• Web page code is a mixture of the text the user
sees in the browser surrounded by a variety of
markup elements
• An element is a pair of HTML tags containing
content
• An HTML tag includes an opening bracket (<), an
element name such as h1, and a closing bracket
• The end tag has a slash ( / ) preceding the
element.
6
HTML Syntax
• Some HTML elements contain only a single
tag. These are known as void elements
• Void elements insert something onto the
page, such as a new line using the <br>
element
7
HTML Syntax
8
HTML Syntax
• Some HTML elements support attributes that
let you provide more information about an
element
• Here is an attribute (shown in bold) added to
an <h1> element:
<h1 id="maintitle">Main Title of the
Document</h1>
9
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
10
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
11
12
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
13
14
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
15
16
Adding Style with CSS
• The next two figures show CSS style rules and
the result in the browser
• The style rules in Figure 1-9 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-10 shows the results in the browser
17
18
19
CSS Syntax
• Style rules express style characteristics for an
HTML element
• For example, the following style rule sets all
<p> elements to blue text:
P {color: blue;}
• Style rules contain a selector and a
declaration
• You will learn more about CSS in Chapter 4
20
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
21
Understanding the History of HTML
22
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
23
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
24
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
25
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
26
A Need for Standards
27
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
28
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
29
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>
30
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
31
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
32
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
33
Working with HTML5
34
Working with HTML5
• HTML5 attempts to address shortcomings of
HTML
– Logical sectioning elements
– Rich media
– Support for applications
• Removes old features:
– All display elements have been removed in favor
of CSS
– Framesets are gone
35
Working with HTML5
• HTML5 looks almost exactly like previous versions
of HTML
• The HTML5 <!DOCTYPE> statement is less
complicated than in previous versions of HTML
• The <meta> element specifies the document
content type and character set. Many pages leave
out this critical piece of information that tells the
browser how to correctly interpret your HTML
code
36
37
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
38
39
40
Choosing the Correct Syntax
• It is a best practice to code using syntax that
follows the stricter syntax rules, which are
based on XML rules
• The code you create for web content can have
multiple purposes and potentially be used in a
variety of display and application
environments
41
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>
42
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">
43
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
44
HTML5 Element Categories
• Metadata content
• Flow content
• Sectioning root
• Sectioning content
• Heading content
• Phrasing content
• Embedded content
• Interactive content
• Transparent
45
New Elements in HTML5
• HTML5 has a number of new elements; see
Table 1-2 in the text
• All elements are supported by all modern
browsers
46
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
47
Obsolete Elements in HTML5
• Many elements have been removed in HTML5,
mostly involving presentation effects
• Framesets are no longer available
48
Using HTML5 Elements for Page
Structure
• Most web pages contain common characteristics:
– Header
– Navigation
– Articles
– Figures
– Footers
– Sidebars
• Until recently, most web pages were marked up
with <div> elements and id or class names
49
50
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
51
Using HTML5 Elements for Page
Structure
• 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>
52
53
Interactive Capabilities in HTML5
• Audio and video
• Drawing canvas
• Background application processing
• Local data storage
54
Use Good Coding Practices
55
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
56
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
57
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
58
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
59
60
Summary
• Make sure to check for support of new HTML5
elements
• Use Cascading Style Sheets
• Code to the stricter HTML5 standard
• Use good coding practices
• Use semantic markup
61

More Related Content

Similar to 9781285852645_CH01 research and analysis of data.pptx

02 From HTML tags to XHTML
02 From HTML tags to XHTML02 From HTML tags to XHTML
02 From HTML tags to XHTMLRich Dron
 
HTML Demo.ppt
HTML Demo.pptHTML Demo.ppt
HTML Demo.pptLimEchYrr
 
Developing Website.pptx
Developing Website.pptxDeveloping Website.pptx
Developing Website.pptxssuser8efb33
 
WT Module-1.pdf
WT Module-1.pdfWT Module-1.pdf
WT Module-1.pdfRamyaH11
 
Web Technology.pptx
Web Technology.pptxWeb Technology.pptx
Web Technology.pptxVishalJaishwar
 
Fii Practic Frontend BeeNear - laborator 1
Fii Practic Frontend BeeNear - laborator 1Fii Practic Frontend BeeNear - laborator 1
Fii Practic Frontend BeeNear - laborator 1BeeNear
 
WEB TECHNOLOGY:Web Essentials and Markup Language HTML
WEB TECHNOLOGY:Web Essentials and Markup Language HTMLWEB TECHNOLOGY:Web Essentials and Markup Language HTML
WEB TECHNOLOGY:Web Essentials and Markup Language HTMLsmitawagh14
 
Html vs xhtml
Html vs xhtmlHtml vs xhtml
Html vs xhtmlYastee Shah
 
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) introductionMustafa Kamel Mohammadi
 
Ddpz2613 topic1 introduction
Ddpz2613 topic1 introductionDdpz2613 topic1 introduction
Ddpz2613 topic1 introductionMohamad Sahiedan
 
HTML Intro
HTML IntroHTML Intro
HTML Introkoppenolski
 
Web design using html
Web design using htmlWeb design using html
Web design using htmlElsaS7
 
Chapter 1 Getting Started with HTML5
Chapter 1 Getting Started with HTML5Chapter 1 Getting Started with HTML5
Chapter 1 Getting Started with HTML5Dr. Ahmed Al Zaidy
 
Web Design
Web DesignWeb Design
Web DesignRawshan Ali
 
Web forms and html (lect 1)
Web forms and html (lect 1)Web forms and html (lect 1)
Web forms and html (lect 1)Salman Memon
 
HTML & CSS.ppt
HTML & CSS.pptHTML & CSS.ppt
HTML & CSS.pptvaseemshaik21
 

Similar to 9781285852645_CH01 research and analysis of data.pptx (20)

Html5
Html5 Html5
Html5
 
02 From HTML tags to XHTML
02 From HTML tags to XHTML02 From HTML tags to XHTML
02 From HTML tags to XHTML
 
HTML Demo.ppt
HTML Demo.pptHTML Demo.ppt
HTML Demo.ppt
 
Developing Website.pptx
Developing Website.pptxDeveloping Website.pptx
Developing Website.pptx
 
WT Module-1.pdf
WT Module-1.pdfWT Module-1.pdf
WT Module-1.pdf
 
Web Technology.pptx
Web Technology.pptxWeb Technology.pptx
Web Technology.pptx
 
Fii Practic Frontend BeeNear - laborator 1
Fii Practic Frontend BeeNear - laborator 1Fii Practic Frontend BeeNear - laborator 1
Fii Practic Frontend BeeNear - laborator 1
 
WEB TECHNOLOGY:Web Essentials and Markup Language HTML
WEB TECHNOLOGY:Web Essentials and Markup Language HTMLWEB TECHNOLOGY:Web Essentials and Markup Language HTML
WEB TECHNOLOGY:Web Essentials and Markup Language HTML
 
Html vs xhtml
Html vs xhtmlHtml vs xhtml
Html vs xhtml
 
Unit 01 (1).pdf
Unit 01 (1).pdfUnit 01 (1).pdf
Unit 01 (1).pdf
 
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
 
Ddpz2613 topic1 introduction
Ddpz2613 topic1 introductionDdpz2613 topic1 introduction
Ddpz2613 topic1 introduction
 
HTML Intro
HTML IntroHTML Intro
HTML Intro
 
Web design using html
Web design using htmlWeb design using html
Web design using html
 
Chapter 1 Getting Started with HTML5
Chapter 1 Getting Started with HTML5Chapter 1 Getting Started with HTML5
Chapter 1 Getting Started with HTML5
 
Dhtml ppt (2)
Dhtml ppt (2)Dhtml ppt (2)
Dhtml ppt (2)
 
Web Design
Web DesignWeb Design
Web Design
 
Web forms and html (lect 1)
Web forms and html (lect 1)Web forms and html (lect 1)
Web forms and html (lect 1)
 
Introduction To HTML
Introduction To HTMLIntroduction To HTML
Introduction To HTML
 
HTML & CSS.ppt
HTML & CSS.pptHTML & CSS.ppt
HTML & CSS.ppt
 

More from clement swarnappa

Web Concepts_Introduction to presentation.pptx
Web Concepts_Introduction to presentation.pptxWeb Concepts_Introduction to presentation.pptx
Web Concepts_Introduction to presentation.pptxclement swarnappa
 
Web Concepts_Introduction to Website Planning
Web Concepts_Introduction to Website PlanningWeb Concepts_Introduction to Website Planning
Web Concepts_Introduction to Website Planningclement swarnappa
 
Lecture slides on Fundamentals of Information Technology.pptx
Lecture slides on Fundamentals of Information Technology.pptxLecture slides on Fundamentals of Information Technology.pptx
Lecture slides on Fundamentals of Information Technology.pptxclement swarnappa
 
introduction to problem solving using data visualisation technique.pptx
introduction to problem solving using data visualisation technique.pptxintroduction to problem solving using data visualisation technique.pptx
introduction to problem solving using data visualisation technique.pptxclement swarnappa
 
Web Concepts for professionals in information technology _Lec5g.pptx
Web Concepts for professionals in information technology _Lec5g.pptxWeb Concepts for professionals in information technology _Lec5g.pptx
Web Concepts for professionals in information technology _Lec5g.pptxclement swarnappa
 
Web Concepts for professionals in information technology _Lec6.pptx
Web Concepts for professionals in information technology _Lec6.pptxWeb Concepts for professionals in information technology _Lec6.pptx
Web Concepts for professionals in information technology _Lec6.pptxclement swarnappa
 
Lecture 1 _ Introduction to ID and HCI.pptx
Lecture 1 _ Introduction to ID and HCI.pptxLecture 1 _ Introduction to ID and HCI.pptx
Lecture 1 _ Introduction to ID and HCI.pptxclement swarnappa
 
Tables_ATT502_activities and relationships in a database
Tables_ATT502_activities and relationships in a databaseTables_ATT502_activities and relationships in a database
Tables_ATT502_activities and relationships in a databaseclement swarnappa
 
Tables in databases - Relationships and diagrams
Tables in  databases - Relationships and diagramsTables in  databases - Relationships and diagrams
Tables in databases - Relationships and diagramsclement swarnappa
 
Hardware Lecture_PPT_WK01_Computer_Parts_Tools.pptx
Hardware Lecture_PPT_WK01_Computer_Parts_Tools.pptxHardware Lecture_PPT_WK01_Computer_Parts_Tools.pptx
Hardware Lecture_PPT_WK01_Computer_Parts_Tools.pptxclement swarnappa
 
Windows 7-profile-screenshots
Windows 7-profile-screenshotsWindows 7-profile-screenshots
Windows 7-profile-screenshotsclement swarnappa
 

More from clement swarnappa (12)

Web Concepts_Introduction to presentation.pptx
Web Concepts_Introduction to presentation.pptxWeb Concepts_Introduction to presentation.pptx
Web Concepts_Introduction to presentation.pptx
 
Web Concepts_Introduction to Website Planning
Web Concepts_Introduction to Website PlanningWeb Concepts_Introduction to Website Planning
Web Concepts_Introduction to Website Planning
 
Lecture slides on Fundamentals of Information Technology.pptx
Lecture slides on Fundamentals of Information Technology.pptxLecture slides on Fundamentals of Information Technology.pptx
Lecture slides on Fundamentals of Information Technology.pptx
 
introduction to problem solving using data visualisation technique.pptx
introduction to problem solving using data visualisation technique.pptxintroduction to problem solving using data visualisation technique.pptx
introduction to problem solving using data visualisation technique.pptx
 
Web Concepts for professionals in information technology _Lec5g.pptx
Web Concepts for professionals in information technology _Lec5g.pptxWeb Concepts for professionals in information technology _Lec5g.pptx
Web Concepts for professionals in information technology _Lec5g.pptx
 
Web Concepts for professionals in information technology _Lec6.pptx
Web Concepts for professionals in information technology _Lec6.pptxWeb Concepts for professionals in information technology _Lec6.pptx
Web Concepts for professionals in information technology _Lec6.pptx
 
Lecture 1 _ Introduction to ID and HCI.pptx
Lecture 1 _ Introduction to ID and HCI.pptxLecture 1 _ Introduction to ID and HCI.pptx
Lecture 1 _ Introduction to ID and HCI.pptx
 
Tables_ATT502_activities and relationships in a database
Tables_ATT502_activities and relationships in a databaseTables_ATT502_activities and relationships in a database
Tables_ATT502_activities and relationships in a database
 
Tables in databases - Relationships and diagrams
Tables in  databases - Relationships and diagramsTables in  databases - Relationships and diagrams
Tables in databases - Relationships and diagrams
 
Hardware Lecture_PPT_WK01_Computer_Parts_Tools.pptx
Hardware Lecture_PPT_WK01_Computer_Parts_Tools.pptxHardware Lecture_PPT_WK01_Computer_Parts_Tools.pptx
Hardware Lecture_PPT_WK01_Computer_Parts_Tools.pptx
 
Windows 7-profile-screenshots
Windows 7-profile-screenshotsWindows 7-profile-screenshots
Windows 7-profile-screenshots
 
RIFT@NTLT2013
RIFT@NTLT2013RIFT@NTLT2013
RIFT@NTLT2013
 

Recently uploaded

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 

Recently uploaded (20)

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 

9781285852645_CH01 research and analysis of data.pptx

  • 1. Principles of Web Design 6th Edition Chapter 1 – HTML5
  • 2. Objectives • Create web pages with HTML • Add style with CSS • Describe the history of HTML • Work with HTML5 • Use good coding practices 2
  • 3. Creating Web Pages with HTML 3
  • 4. 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> 4
  • 5. 5
  • 6. HTML Syntax • Web page code is a mixture of the text the user sees in the browser surrounded by a variety of markup elements • An element is a pair of HTML tags containing content • An HTML tag includes an opening bracket (<), an element name such as h1, and a closing bracket • The end tag has a slash ( / ) preceding the element. 6
  • 7. HTML Syntax • Some HTML elements contain only a single tag. These are known as void elements • Void elements insert something onto the page, such as a new line using the <br> element 7
  • 9. HTML Syntax • Some HTML elements support attributes that let you provide more information about an element • Here is an attribute (shown in bold) added to an <h1> element: <h1 id="maintitle">Main Title of the Document</h1> 9
  • 10. 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 10
  • 11. 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 11
  • 12. 12
  • 13. 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 13
  • 14. 14
  • 15. 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 15
  • 16. 16
  • 17. Adding Style with CSS • The next two figures show CSS style rules and the result in the browser • The style rules in Figure 1-9 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-10 shows the results in the browser 17
  • 18. 18
  • 19. 19
  • 20. CSS Syntax • Style rules express style characteristics for an HTML element • For example, the following style rule sets all <p> elements to blue text: P {color: blue;} • Style rules contain a selector and a declaration • You will learn more about CSS in Chapter 4 20
  • 21. 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 21
  • 23. 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 23
  • 24. 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 24
  • 25. 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 25
  • 26. 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 26
  • 27. A Need for Standards 27
  • 28. 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 28
  • 29. 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 29
  • 30. 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> 30
  • 31. 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 31
  • 32. 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 32
  • 33. 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 33
  • 35. Working with HTML5 • HTML5 attempts to address shortcomings of HTML – Logical sectioning elements – Rich media – Support for applications • Removes old features: – All display elements have been removed in favor of CSS – Framesets are gone 35
  • 36. Working with HTML5 • HTML5 looks almost exactly like previous versions of HTML • The HTML5 <!DOCTYPE> statement is less complicated than in previous versions of HTML • The <meta> element specifies the document content type and character set. Many pages leave out this critical piece of information that tells the browser how to correctly interpret your HTML code 36
  • 37. 37
  • 38. 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 38
  • 39. 39
  • 40. 40
  • 41. Choosing the Correct Syntax • It is a best practice to code using syntax that follows the stricter syntax rules, which are based on XML rules • The code you create for web content can have multiple purposes and potentially be used in a variety of display and application environments 41
  • 42. 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> 42
  • 43. 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"> 43
  • 44. 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 44
  • 45. HTML5 Element Categories • Metadata content • Flow content • Sectioning root • Sectioning content • Heading content • Phrasing content • Embedded content • Interactive content • Transparent 45
  • 46. New Elements in HTML5 • HTML5 has a number of new elements; see Table 1-2 in the text • All elements are supported by all modern browsers 46
  • 47. 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 47
  • 48. Obsolete Elements in HTML5 • Many elements have been removed in HTML5, mostly involving presentation effects • Framesets are no longer available 48
  • 49. Using HTML5 Elements for Page Structure • Most web pages contain common characteristics: – Header – Navigation – Articles – Figures – Footers – Sidebars • Until recently, most web pages were marked up with <div> elements and id or class names 49
  • 50. 50
  • 51. 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 51
  • 52. Using HTML5 Elements for Page Structure • 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> 52
  • 53. 53
  • 54. Interactive Capabilities in HTML5 • Audio and video • Drawing canvas • Background application processing • Local data storage 54
  • 55. Use Good Coding Practices 55
  • 56. 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 56
  • 57. 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 57
  • 58. 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 58
  • 59. 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 59
  • 60. 60
  • 61. Summary • Make sure to check for support of new HTML5 elements • Use Cascading Style Sheets • Code to the stricter HTML5 standard • Use good coding practices • Use semantic markup 61