SlideShare a Scribd company logo
Chapter 2
Building a Webpage
Template with HTML5
Web Design with
HTML5 & CSS3
8th Edition
• Explain how to manage website files
• Describe and use HTML5 semantic elements
• Determine the elements to use when setting the
structure of a webpage
• Design and build a semantic wireframe
• Create a webpage template
• Insert comments in an HTML document
Chapter 2: Building a Webpage Template with HTML5 2
Objectives
• Add static content to a webpage template
• Insert symbol codes and other character entities
• Describe the benefits of validating web
documents
• Validate an HTML template
• Create a home page from an HTML template
• Add unique content to a webpage
Chapter 2: Building a Webpage Template with HTML5 3
Objectives (continued)
• Designing a website includes the following:
– Planning
– Articulating the website’s purpose
– Identifying the target audience
– Creating a site map and wireframe
– Selecting graphics and colors to use in the site
– Determining whether to design for an optimal viewing
experience across a range of devices
Chapter 2: Building a Webpage Template with HTML5 4
Designing a Website
Chapter 2: Building a Webpage Template with HTML5 5
Designing a Website (continued)
Chapter 2: Building a Webpage Template with HTML5 6
Site Map
• Site map indicates how the pages in a website
relate to each other
• For example, the webpages of the Forward Fitness
Club website will include the following content:
– Home page: Introduces the fitness center and its
mission statement
– About Us page: Showcases the facility’s equipment
and services
Chapter 2: Building a Webpage Template with HTML5 7
Site Map (continued 1)
– Classes page: Includes a schedule of available group
training and fitness classes
– Nutrition page: Provides nutrition tips and simple meal
plans
– Contact Us page: Provides a phone number, email
address, physical address, and form for potential
clients to request additional information about the
fitness center’s services
Chapter 2: Building a Webpage Template with HTML5 8
Site Map (continued 2)
Chapter 2: Building a Webpage Template with HTML5 9
Wireframe
• Wireframe depicts the layout of a webpage,
including its major content areas
Chapter 2: Building a Webpage Template with HTML5 10
File Management
• Websites use several types of files, including
HTML files, image files, media such as audio and
video files, and CSS files
• Each site must follow a systematic method to
organize its files
• The main folder, also called the root folder,
contains all files and other folders for the website
Chapter 2: Building a Webpage Template with HTML5 11
File Management (continued)
Chapter 2: Building a Webpage Template with HTML5 12
Using HTML5 Semantic Elements
Chapter 2: Building a Webpage Template with HTML5 13
Using HTML5 Semantic Elements
(continued 1)
Chapter 2: Building a Webpage Template with HTML5 14
Creating a Webpage Template
Document
The following steps create a basic webpage
template:
• Open an editor, tap or click File on the menu bar,
and then tap or click New to open a new blank
document
• Tap or click File on the menu bar and then tap or
click Save As to display the Save As dialog box
• Navigate to the fitness folder and then double-tap
or double-click the template folder to open it
Chapter 2: Building a Webpage Template with HTML5 15
Creating a Webpage Template
Document (continued 1)
• In the File name box, type fitness to name the
file
• Tap or click the Save button to type and tap or
click Hyper Text Markup Language to select the
file format
• Tap or click the Save button to save the template
in the template folder
• On Line 1 of the text editor, type <!DOCTYPE
html> to define a new HTML5 document (Figure
2−8)
Chapter 2: Building a Webpage Template with HTML5 16
Creating a Webpage Template
Document (continued 2)
Chapter 2: Building a Webpage Template with HTML5 17
Creating a Webpage Template
Document (continued 3)
• Press the ENTER key to add Line 2 and then type
<html lang=“en”> to add a starting <html> tag
that defines the language as English
• Press the ENTER key to add Line 3 and then type
<head> to add a starting <head> tag (Figure 2−9)
Chapter 2: Creating and Editing a Web Page Using Inline Styles 18
Creating a Webpage Template
Document (continued 4)
Chapter 2: Building a Webpage Template with HTML5 19
Creating a Webpage Template
Document (continued 5)
• Add the following HTML elements to complete
the template using the SPACEBAR or TAB key to
indent Lines 4 and 5
• Use the SHIFT+TAB keys to stop indenting
<title></title>
<meta charset=“utf-8”>
</head>
<body>
</body>
</html>
• Save the changes
Chapter 2: Building a Webpage Template with HTML5 20
Creating a Webpage Template
Document (continued 6)
Chapter 2: Building a Webpage Template with HTML5 21
To Add HTML5 Semantic
Elements to a Webpage
TemplateThe following steps insert HTML5 structural
elements within the body tags:
• Place an insertion point after the beginning
<body> tag and press the enter key twice to insert
new Lines 8 and 9
• On Line 9, press the TAB key and then type
<header> to add a starting header tag
• Press the ENTER key to insert a new Line 10 and
then type </header> to add an ending header tag
(Figure 2–11)
Chapter 2: Building a Webpage Template with HTML5 22
To Add HTML5 Semantic Elements to
a Webpage Template (continued 1)
Chapter 2: Building a Webpage Template with HTML5 23
To Add HTML5 Semantic Elements to
a Webpage Template (continued 2)
• Add the following HTML5 tags to complete the
wireframe, indenting each line and inserting a
blank line after each ending tag:
<nav>
</nav>
(blank line)
<main>
</main>
(blank line)
<footer>
</footer>
Chapter 2: Building a Webpage Template with HTML5 24
To Add HTML5 Semantic Elements to
a Webpage Template (continued 3)
• Save the changes
Chapter 2: Building a Webpage Template with HTML5 25
To Add a Title to a Webpage
Template
The following steps add a webpage title to a
template:
• Place an insertion point after the beginning <title>
tag and type Forward Fitness Club to add a
webpage title
• Save the changes and then view the page in a
browser to display the webpage title
Chapter 2: Building a Webpage Template with HTML5 26
To Add a Title to a Webpage
Template (continued 1)
Chapter 2: Building a Webpage Template with HTML5 27
Comments
• Comments can provide additional information
about the areas within the webpage
• Add a comment before a tag using the following
tag:
<! - - Place your comment here - - >
• Word wrap causes text lines to break at the right
edge of the window and appear on a new line
Chapter 2: Building a Webpage Template with HTML5 28
To Add Comments to a Webpage
Template
The following steps add comments to a webpage
template:
• Place the insertion point after the <!DOCTYPE
html> tag and then press the ENTER key to insert
a new Line 2
• Type <! - - This website template was
created by: Student’s First Name
Student’s Last Name - - > on Line 2 to add a
comment at the beginning of the document that
identifies the author (Figure 2-14)
Chapter 2: Building a Webpage Template with HTML5 29
To Add Comments to a Webpage
Template (continued 1)
Chapter 2: Building a Webpage Template with HTML5 30
To Add Comments to a Webpage
Template (continued 2)
• Place the insertion point on the blank Line 9 and
press the ENTER key to insert a new Line 10
• On Line 10, press the TAB key and then type <! -
- Use the header area for the website
name or logo - - > to add a comment
identifying the type of information to include in
the header area (Figure 2-15)
Chapter 2: Building a Webpage Template with HTML5 31
To Add Comments to a Webpage
Template (continued 3)
Chapter 2: Building a Webpage Template with HTML5 32
To Add Comments to a Webpage
Template (continued 4)
• Place the insertion point on the blank Line 13 and
press the ENTER key to insert a new Line 14
• On Line 14, type <! - - Use the nav area to
add hyperlinks to other pages within the
website - - > to add a comment above the
navigation area (Figure 2-16)
Chapter 2: Building a Webpage Template with HTML5 33
To Add Comments to a Webpage
Template (continued 5)
Chapter 2: Building a Webpage Template with HTML5 34
To Add Comments to a Webpage
Template (continued 6)
• Place the insertion point on the blank Line 17 and
press the ENTER key to insert a new Line 18
• On Line 18, type <! - - Use the main area to
add the main content of the webpage - - >
to add a comment above the main area
• Place the insertion point on the blank Line 21 and
press the ENTER key to insert a new Line 22
• On Line 22, type <! - - Use the footer area
to add webpage footer content - - > to add
a comment above the footer area (Figure 2-17)
Chapter 2: Building a Webpage Template with HTML5 35
To Add Comments to a Webpage
Template (continued 7)
• Save the changes
Chapter 2: Building a Webpage Template with HTML5 36
Webpage Content
• Static content can be added to a webpage that
will appear on every webpage, such as the
business name or logo, the webpage links, and
the footer information
• Following is an example of content added
between header tags:
<header>Forward Fitness Club</header>
Chapter 2: Building a Webpage Template with HTML5 37
Using Symbol Entities
• Symbols can be added to an HTML webpage by
typing its HTML entity name or entity number
• Inserting an HTML character entity in the code
displays a reserved HTML character on the
webpage
• Entity name is an abbreviated name
• Entity number is a combination of the pound sign
(#) and a numeric code
Chapter 2: Building a Webpage Template with HTML5 38
Using Symbol Entities
(continued)
Chapter 2: Building a Webpage Template with HTML5 39
Validating HTML Documents
• After the creation of an HTML file, the document
is validated to verify the validity of the HTML
code
• A validator checks for errors, indicates where they
are located, and suggests corrections
• If the validator detects an error in an HTML code,
it displays a warning in the header bar
• A Result line below the header bar shows the
number of errors in the document
Chapter 2: Building a Webpage Template with HTML5 40
Creating a Home Page Using a
Webpage Template
The following steps create the home page for the
fitness website using the webpage template:
• Tap or click File on the menu bar and then tap or
click Save As to display the Save As dialog box
• Tap or click the Up One Level button to display the
contents of the fitness folder
• In the File name text box, type index to name the
file
• Tap or click the Save button to save the index file
in the fitness folder
Chapter 2: Building a Webpage Template with HTML5 41
Creating a Home Page Using a
Webpage Template (continued 1)
• Place an insertion point after the beginning
<main> tag and press the ENTER key twice to
insert two new lines, in this case, Lines 26 and 27
• On Line 27, press the TAB key and then type
<p>Welcome to Forward Fitness Club. Our
mission is to help our clients meet their
fitness and nutrition goals.</p> to add
paragraph tags and content to the page (Figure 2-
29)
Chapter 2: Building a Webpage Template with HTML5 42
Creating a Home Page Using a
Webpage Template (continued 2)
Chapter 2: Building a Webpage Template with HTML5 43
Creating a Home Page Using a
Webpage Template (continued 3)
• Press the ENTER key two times to insert two new
lines and then type the contents within paragraph
tags, as shown on Line 29, to add a second
paragraph to the page
• Press the ENTER key two times to insert two new
lines and then type another paragraph, as shown
on Line 31, to add a third paragraph to the page
(Figure 2-30)
Chapter 2: Building a Webpage Template with HTML5 44
Creating a Home Page Using a
Webpage Template (continued 4)
Chapter 2: Building a Webpage Template with HTML5 45
Creating a Home Page Using a
Webpage Template (continued 5)
• Press the ENTER key to insert a new blank line
above the ending </main> tag
• Check the spelling of the document and the
changes
Chapter 2: Building a Webpage Template with HTML5 46
To Display a Home Page in the
Default Browser
• By using a command in an HTML editor, one can
open an HTML file from a file viewer such as File
Explorer or Finder
• When an HTML file is given a double-tap or
double-click, it opens in the default browser on
the computer
• To open an HTML file in a different browser, press
and hold or right-click the HTML file, tap or click
Open with, and then tap or click an alternate
browser
Chapter 2 Complete
HTML
8th Edition

More Related Content

PPTX
HTML & CSS: Chapter 03
PPTX
HTML5 &CSS: Chapter 08
PPTX
HTML & CSS: Chapter 07
PPTX
PPTX
Html images syntax
PPTX
HTML: Chapter 01
PPT
Cascading Style Sheets (CSS) help
PPTX
Cascading style sheets (CSS)
HTML & CSS: Chapter 03
HTML5 &CSS: Chapter 08
HTML & CSS: Chapter 07
Html images syntax
HTML: Chapter 01
Cascading Style Sheets (CSS) help
Cascading style sheets (CSS)

What's hot (20)

PDF
Introduction to CSS3
PPTX
HTML & CSS: Chapter 04
PPT
Intro Html
PPT
PPTX
HTML & CSS: Chapter 06
PPTX
Introduction to HTML and CSS
PPT
Html & Css presentation
PPTX
PDF
Lesson 1: Introduction to HTML
PPTX
Html links
PPT
PPT
PPTX
Css types internal, external and inline (1)
PPTX
PPT
Advanced Cascading Style Sheets
PPTX
Html5 semantics
PPSX
Introduction to css
PPT
Html ppt
Introduction to CSS3
HTML & CSS: Chapter 04
Intro Html
HTML & CSS: Chapter 06
Introduction to HTML and CSS
Html & Css presentation
Lesson 1: Introduction to HTML
Html links
Css types internal, external and inline (1)
Advanced Cascading Style Sheets
Html5 semantics
Introduction to css
Html ppt
Ad

Similar to Html and CSS: Chapter 02 (20)

PPT
Ddpz2613 topic2 web
PPTX
Grade 6-Hyper Text Markup Language .pptx
PPTX
MTA html5 text_graphics_media
PDF
Web technology practical list
PPT
Hyper Text markup language web designdesign
PDF
It 236 it236
PDF
It 236 it236
PPT
HTML 5 Complete Reference
PPTX
Basic html structure
PPTX
Html5
PDF
UNIT 2.2 Web Programming HTML Basics - Benchmark standard
PPT
Dreamweaver
PDF
Module 1 - Introduction to HTML.pdf
PPTX
Share point 2013 Building Websites
PPTX
Delhi student's day
PPTX
Html basic
PPT
Ddpz2613 topic6 frame
PDF
Full Stack Development Course in Gurgaon
PDF
Web design in 7 days
PDF
Web design in 7 days by waqar
Ddpz2613 topic2 web
Grade 6-Hyper Text Markup Language .pptx
MTA html5 text_graphics_media
Web technology practical list
Hyper Text markup language web designdesign
It 236 it236
It 236 it236
HTML 5 Complete Reference
Basic html structure
Html5
UNIT 2.2 Web Programming HTML Basics - Benchmark standard
Dreamweaver
Module 1 - Introduction to HTML.pdf
Share point 2013 Building Websites
Delhi student's day
Html basic
Ddpz2613 topic6 frame
Full Stack Development Course in Gurgaon
Web design in 7 days
Web design in 7 days by waqar
Ad

More from Steve Guinan (20)

PPTX
Chapter 18: Transitions, Transforms, and Animation
PPTX
Chapter 17: Responsive Web Design
PPTX
Chapter 15: Floating and Positioning
PPTX
Chapter 9: Forms
PPTX
Chapter 8: Tables
PPTX
Chapter 14: Box Model
PPTX
Chapter 13: Colors and Backgrounds
PPTX
Chapter 12: CSS Part 2
PPTX
Chapter 11: Intro to CSS
PPTX
Chapter 23: Web Images
PPTX
Chapter 7: Images
PPTX
HubSpot Student Instructions
PPTX
Ch 6: Links
PPTX
Ch 5: Marking up Text
PPTX
Ch 3: Big Concepts
PPTX
Ch 2: How the Web Works
PPTX
Ch 1: Getting Started
PPTX
Intro to Web Design 6e Chapter 7
PPTX
Intro to Web Design 6e Chapter 6
PPTX
Intro to Web Design 6e Chapter 5
Chapter 18: Transitions, Transforms, and Animation
Chapter 17: Responsive Web Design
Chapter 15: Floating and Positioning
Chapter 9: Forms
Chapter 8: Tables
Chapter 14: Box Model
Chapter 13: Colors and Backgrounds
Chapter 12: CSS Part 2
Chapter 11: Intro to CSS
Chapter 23: Web Images
Chapter 7: Images
HubSpot Student Instructions
Ch 6: Links
Ch 5: Marking up Text
Ch 3: Big Concepts
Ch 2: How the Web Works
Ch 1: Getting Started
Intro to Web Design 6e Chapter 7
Intro to Web Design 6e Chapter 6
Intro to Web Design 6e Chapter 5

Recently uploaded (20)

PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PDF
Open folder Downloads.pdf yes yes ges yes
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PPTX
Cell Structure & Organelles in detailed.
PPTX
COMPUTERS AS DATA ANALYSIS IN PRECLINICAL DEVELOPMENT.pptx
PPTX
Open Quiz Monsoon Mind Game Prelims.pptx
PDF
PSYCHOLOGY IN EDUCATION.pdf ( nice pdf ...)
PDF
The Final Stretch: How to Release a Game and Not Die in the Process.
PPTX
Introduction and Scope of Bichemistry.pptx
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
English Language Teaching from Post-.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
Open Quiz Monsoon Mind Game Final Set.pptx
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PPTX
Pharma ospi slides which help in ospi learning
PDF
Microbial disease of the cardiovascular and lymphatic systems
Anesthesia in Laparoscopic Surgery in India
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
Open folder Downloads.pdf yes yes ges yes
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Week 4 Term 3 Study Techniques revisited.pptx
Cell Structure & Organelles in detailed.
COMPUTERS AS DATA ANALYSIS IN PRECLINICAL DEVELOPMENT.pptx
Open Quiz Monsoon Mind Game Prelims.pptx
PSYCHOLOGY IN EDUCATION.pdf ( nice pdf ...)
The Final Stretch: How to Release a Game and Not Die in the Process.
Introduction and Scope of Bichemistry.pptx
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
English Language Teaching from Post-.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Open Quiz Monsoon Mind Game Final Set.pptx
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Pharma ospi slides which help in ospi learning
Microbial disease of the cardiovascular and lymphatic systems

Html and CSS: Chapter 02

  • 1. Chapter 2 Building a Webpage Template with HTML5 Web Design with HTML5 & CSS3 8th Edition
  • 2. • Explain how to manage website files • Describe and use HTML5 semantic elements • Determine the elements to use when setting the structure of a webpage • Design and build a semantic wireframe • Create a webpage template • Insert comments in an HTML document Chapter 2: Building a Webpage Template with HTML5 2 Objectives
  • 3. • Add static content to a webpage template • Insert symbol codes and other character entities • Describe the benefits of validating web documents • Validate an HTML template • Create a home page from an HTML template • Add unique content to a webpage Chapter 2: Building a Webpage Template with HTML5 3 Objectives (continued)
  • 4. • Designing a website includes the following: – Planning – Articulating the website’s purpose – Identifying the target audience – Creating a site map and wireframe – Selecting graphics and colors to use in the site – Determining whether to design for an optimal viewing experience across a range of devices Chapter 2: Building a Webpage Template with HTML5 4 Designing a Website
  • 5. Chapter 2: Building a Webpage Template with HTML5 5 Designing a Website (continued)
  • 6. Chapter 2: Building a Webpage Template with HTML5 6 Site Map • Site map indicates how the pages in a website relate to each other • For example, the webpages of the Forward Fitness Club website will include the following content: – Home page: Introduces the fitness center and its mission statement – About Us page: Showcases the facility’s equipment and services
  • 7. Chapter 2: Building a Webpage Template with HTML5 7 Site Map (continued 1) – Classes page: Includes a schedule of available group training and fitness classes – Nutrition page: Provides nutrition tips and simple meal plans – Contact Us page: Provides a phone number, email address, physical address, and form for potential clients to request additional information about the fitness center’s services
  • 8. Chapter 2: Building a Webpage Template with HTML5 8 Site Map (continued 2)
  • 9. Chapter 2: Building a Webpage Template with HTML5 9 Wireframe • Wireframe depicts the layout of a webpage, including its major content areas
  • 10. Chapter 2: Building a Webpage Template with HTML5 10 File Management • Websites use several types of files, including HTML files, image files, media such as audio and video files, and CSS files • Each site must follow a systematic method to organize its files • The main folder, also called the root folder, contains all files and other folders for the website
  • 11. Chapter 2: Building a Webpage Template with HTML5 11 File Management (continued)
  • 12. Chapter 2: Building a Webpage Template with HTML5 12 Using HTML5 Semantic Elements
  • 13. Chapter 2: Building a Webpage Template with HTML5 13 Using HTML5 Semantic Elements (continued 1)
  • 14. Chapter 2: Building a Webpage Template with HTML5 14 Creating a Webpage Template Document The following steps create a basic webpage template: • Open an editor, tap or click File on the menu bar, and then tap or click New to open a new blank document • Tap or click File on the menu bar and then tap or click Save As to display the Save As dialog box • Navigate to the fitness folder and then double-tap or double-click the template folder to open it
  • 15. Chapter 2: Building a Webpage Template with HTML5 15 Creating a Webpage Template Document (continued 1) • In the File name box, type fitness to name the file • Tap or click the Save button to type and tap or click Hyper Text Markup Language to select the file format • Tap or click the Save button to save the template in the template folder • On Line 1 of the text editor, type <!DOCTYPE html> to define a new HTML5 document (Figure 2−8)
  • 16. Chapter 2: Building a Webpage Template with HTML5 16 Creating a Webpage Template Document (continued 2)
  • 17. Chapter 2: Building a Webpage Template with HTML5 17 Creating a Webpage Template Document (continued 3) • Press the ENTER key to add Line 2 and then type <html lang=“en”> to add a starting <html> tag that defines the language as English • Press the ENTER key to add Line 3 and then type <head> to add a starting <head> tag (Figure 2−9)
  • 18. Chapter 2: Creating and Editing a Web Page Using Inline Styles 18 Creating a Webpage Template Document (continued 4)
  • 19. Chapter 2: Building a Webpage Template with HTML5 19 Creating a Webpage Template Document (continued 5) • Add the following HTML elements to complete the template using the SPACEBAR or TAB key to indent Lines 4 and 5 • Use the SHIFT+TAB keys to stop indenting <title></title> <meta charset=“utf-8”> </head> <body> </body> </html> • Save the changes
  • 20. Chapter 2: Building a Webpage Template with HTML5 20 Creating a Webpage Template Document (continued 6)
  • 21. Chapter 2: Building a Webpage Template with HTML5 21 To Add HTML5 Semantic Elements to a Webpage TemplateThe following steps insert HTML5 structural elements within the body tags: • Place an insertion point after the beginning <body> tag and press the enter key twice to insert new Lines 8 and 9 • On Line 9, press the TAB key and then type <header> to add a starting header tag • Press the ENTER key to insert a new Line 10 and then type </header> to add an ending header tag (Figure 2–11)
  • 22. Chapter 2: Building a Webpage Template with HTML5 22 To Add HTML5 Semantic Elements to a Webpage Template (continued 1)
  • 23. Chapter 2: Building a Webpage Template with HTML5 23 To Add HTML5 Semantic Elements to a Webpage Template (continued 2) • Add the following HTML5 tags to complete the wireframe, indenting each line and inserting a blank line after each ending tag: <nav> </nav> (blank line) <main> </main> (blank line) <footer> </footer>
  • 24. Chapter 2: Building a Webpage Template with HTML5 24 To Add HTML5 Semantic Elements to a Webpage Template (continued 3) • Save the changes
  • 25. Chapter 2: Building a Webpage Template with HTML5 25 To Add a Title to a Webpage Template The following steps add a webpage title to a template: • Place an insertion point after the beginning <title> tag and type Forward Fitness Club to add a webpage title • Save the changes and then view the page in a browser to display the webpage title
  • 26. Chapter 2: Building a Webpage Template with HTML5 26 To Add a Title to a Webpage Template (continued 1)
  • 27. Chapter 2: Building a Webpage Template with HTML5 27 Comments • Comments can provide additional information about the areas within the webpage • Add a comment before a tag using the following tag: <! - - Place your comment here - - > • Word wrap causes text lines to break at the right edge of the window and appear on a new line
  • 28. Chapter 2: Building a Webpage Template with HTML5 28 To Add Comments to a Webpage Template The following steps add comments to a webpage template: • Place the insertion point after the <!DOCTYPE html> tag and then press the ENTER key to insert a new Line 2 • Type <! - - This website template was created by: Student’s First Name Student’s Last Name - - > on Line 2 to add a comment at the beginning of the document that identifies the author (Figure 2-14)
  • 29. Chapter 2: Building a Webpage Template with HTML5 29 To Add Comments to a Webpage Template (continued 1)
  • 30. Chapter 2: Building a Webpage Template with HTML5 30 To Add Comments to a Webpage Template (continued 2) • Place the insertion point on the blank Line 9 and press the ENTER key to insert a new Line 10 • On Line 10, press the TAB key and then type <! - - Use the header area for the website name or logo - - > to add a comment identifying the type of information to include in the header area (Figure 2-15)
  • 31. Chapter 2: Building a Webpage Template with HTML5 31 To Add Comments to a Webpage Template (continued 3)
  • 32. Chapter 2: Building a Webpage Template with HTML5 32 To Add Comments to a Webpage Template (continued 4) • Place the insertion point on the blank Line 13 and press the ENTER key to insert a new Line 14 • On Line 14, type <! - - Use the nav area to add hyperlinks to other pages within the website - - > to add a comment above the navigation area (Figure 2-16)
  • 33. Chapter 2: Building a Webpage Template with HTML5 33 To Add Comments to a Webpage Template (continued 5)
  • 34. Chapter 2: Building a Webpage Template with HTML5 34 To Add Comments to a Webpage Template (continued 6) • Place the insertion point on the blank Line 17 and press the ENTER key to insert a new Line 18 • On Line 18, type <! - - Use the main area to add the main content of the webpage - - > to add a comment above the main area • Place the insertion point on the blank Line 21 and press the ENTER key to insert a new Line 22 • On Line 22, type <! - - Use the footer area to add webpage footer content - - > to add a comment above the footer area (Figure 2-17)
  • 35. Chapter 2: Building a Webpage Template with HTML5 35 To Add Comments to a Webpage Template (continued 7) • Save the changes
  • 36. Chapter 2: Building a Webpage Template with HTML5 36 Webpage Content • Static content can be added to a webpage that will appear on every webpage, such as the business name or logo, the webpage links, and the footer information • Following is an example of content added between header tags: <header>Forward Fitness Club</header>
  • 37. Chapter 2: Building a Webpage Template with HTML5 37 Using Symbol Entities • Symbols can be added to an HTML webpage by typing its HTML entity name or entity number • Inserting an HTML character entity in the code displays a reserved HTML character on the webpage • Entity name is an abbreviated name • Entity number is a combination of the pound sign (#) and a numeric code
  • 38. Chapter 2: Building a Webpage Template with HTML5 38 Using Symbol Entities (continued)
  • 39. Chapter 2: Building a Webpage Template with HTML5 39 Validating HTML Documents • After the creation of an HTML file, the document is validated to verify the validity of the HTML code • A validator checks for errors, indicates where they are located, and suggests corrections • If the validator detects an error in an HTML code, it displays a warning in the header bar • A Result line below the header bar shows the number of errors in the document
  • 40. Chapter 2: Building a Webpage Template with HTML5 40 Creating a Home Page Using a Webpage Template The following steps create the home page for the fitness website using the webpage template: • Tap or click File on the menu bar and then tap or click Save As to display the Save As dialog box • Tap or click the Up One Level button to display the contents of the fitness folder • In the File name text box, type index to name the file • Tap or click the Save button to save the index file in the fitness folder
  • 41. Chapter 2: Building a Webpage Template with HTML5 41 Creating a Home Page Using a Webpage Template (continued 1) • Place an insertion point after the beginning <main> tag and press the ENTER key twice to insert two new lines, in this case, Lines 26 and 27 • On Line 27, press the TAB key and then type <p>Welcome to Forward Fitness Club. Our mission is to help our clients meet their fitness and nutrition goals.</p> to add paragraph tags and content to the page (Figure 2- 29)
  • 42. Chapter 2: Building a Webpage Template with HTML5 42 Creating a Home Page Using a Webpage Template (continued 2)
  • 43. Chapter 2: Building a Webpage Template with HTML5 43 Creating a Home Page Using a Webpage Template (continued 3) • Press the ENTER key two times to insert two new lines and then type the contents within paragraph tags, as shown on Line 29, to add a second paragraph to the page • Press the ENTER key two times to insert two new lines and then type another paragraph, as shown on Line 31, to add a third paragraph to the page (Figure 2-30)
  • 44. Chapter 2: Building a Webpage Template with HTML5 44 Creating a Home Page Using a Webpage Template (continued 4)
  • 45. Chapter 2: Building a Webpage Template with HTML5 45 Creating a Home Page Using a Webpage Template (continued 5) • Press the ENTER key to insert a new blank line above the ending </main> tag • Check the spelling of the document and the changes
  • 46. Chapter 2: Building a Webpage Template with HTML5 46 To Display a Home Page in the Default Browser • By using a command in an HTML editor, one can open an HTML file from a file viewer such as File Explorer or Finder • When an HTML file is given a double-tap or double-click, it opens in the default browser on the computer • To open an HTML file in a different browser, press and hold or right-click the HTML file, tap or click Open with, and then tap or click an alternate browser