Web engineering chapter number 3 for basics

mohizkhan1996s 9 views 55 slides Feb 28, 2025
Slide 1
Slide 1 of 55
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55

About This Presentation

For basics


Slide Content

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Fundamentalsof Web DevelopmentRandy Connolly andRicardo Hoar
© 2017 Pearson
http://www.funwebdev.com
Introduction to
HTML
Chapter 3

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Chapter 3
1 2
3 4
5 6
What Is HTML and
Where Did It
Come from?
HTML Syntax
Semantic
Markup
Structure of HTML
Documents
Quick Tour of
HTML Elements
HTML5 Semantic
Structure
Elements
7
Summary

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Chapter 3
1 2
3 4
5 6
What Is HTML and
Where Did It
Come from?
HTML Syntax
Semantic
Markup
Structure of HTML
Documents
Quick Tour of
HTML Elements
HTML5 Semantic
Structure
Elements
7
Summary

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
What Is HTML and Where Did It Come from?
•HTML is defined as a markup language.
•markupis a way to indicate information about the content
that is distinct from the content
•HTML has been through many versions and branches, the
details of which might matter if you ever see old HTML
code.
HTML

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
What Is HTML and Where Did It Come from?
Markup

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
What Is HTML and Where Did It Come from?
XHTML and Validation

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
What Is HTML and Where Did It Come from?
•Widely implemented in modern browsers
•The current W3C recommendation for web development
•Still relatively new and not always taught.
HTML 5

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Chapter 3
1 2
3 4
5 6
What Is HTML and
Where Did It
Come from?
HTML Syntax
Semantic
Markup
Structure of HTML
Documents
Quick Tour of
HTML Elements
HTML5 Semantic
Structure
Elements
7
Summary

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
HTML Syntax
•HTML documents are composed of textual content and
HTML elements
•HTMLelement encompasses
•the element name within angle brackets (i.e., the tag) and
•HTML elements can also contain attributes.
•the content within the tag.
Elements and Attributes

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
HTML Syntax
An empty element does not contain any text content;
instead, it is an instruction to the browser to do something.
•In XHTML, empty elementshad to be terminated by a
trailing slash.
•In HTML5, the trailing slash in empty elements is optional.
Elements and Attributes

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
HTML Syntax
Nesting HTML Elements

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
HTML Syntax
Nesting HTML Elements

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
HTML Syntax
Nesting HTML Elements

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
HTML Syntax
Nesting HTML Elements

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Chapter 3
1 2
3 4
5 6
What Is HTML and
Where Did It
Come from?
HTML Syntax
Semantic
Markup
Structure of HTML
Documents
Quick Tour of
HTML Elements
HTML5 Semantic
Structure
Elements
7
Summary

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Semantic Markup
Focus on the structure of the document, not the visual
Advantages:
•Maintainability
•Performance
•Accessibility(http://www.w3.org/WAI )
•Search Engine Optimization

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Chapter 3
1 2
3 4
5 6
What Is HTML and
Where Did It
Come from?
HTML Syntax
Semantic
Markup
Structure of HTML
Documents
Quick Tour of
HTML Elements
HTML5 Semantic
Structure
Elements
7
Summary

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Structure of HTML Documents
A simple example

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Structure of HTML Documents
DOCTYPE Short for Document Type Definition tells the
browser what type of document it is about to process
<!DOCTYPE html>
DOCTYPE

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Structure of HTML Documents
A slightly more complex document

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Structure of HTML Documents
Head and Body
HTML5 does not require the use of the <html> , <head>
, and <body>elements (but most developers continue
to use them).
•<html> contains all the other HTML elements in the
document (Item 2 in previous slide)
•<head> contains descriptive elements about the
document, such (title, style sheets, JavaScript files
etc.) (Item 3)
•<body> contains content to be displayed by the
browser (Item 4)

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Structure of HTML Documents
•The <meta> element (Item 5) declares that the character
encoding for the document is UTF-8.
•Item 6 specifies an external CSS style sheet file with
<link> that is used with this document.
•Item 7 references an external JavaScript file using
<script>
Some more common elements

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Chapter 3
1 2
3 4
5 6
What Is HTML and
Where Did It
Come from?
HTML Syntax
Semantic
Markup
Structure of HTML
Documents
Quick Tour of
HTML Elements
HTML5 Semantic
Structure
Elements
7
Summary

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Quick Tour of HTML Elements
A document to walk through

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Quick Tour of HTML Elements
A document to walk through

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Quick Tour of HTML Elements
CSS styles are coming soon, HTML is structural

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Quick Tour of HTML Elements
HTML provides six levels of heading
(h1 -h6)
Headings are also used by the browser to
create a document outline for the page.
Headings

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Quick Tour of HTML Elements
<p> tag is a container for text and other HTML
elements
<div> also a container element and is used to create
a logical grouping of content
Paragraphs and Divisions

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Quick Tour of HTML Elements
•Links are an essential feature of all web pages
•Links use the<a> element (the “a” stands for anchor).
Links

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Quick Tour of HTML Elements
Links

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Quick Tour of HTML Elements
Links (continued)

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Quick Tour of HTML Elements
URL Relative Referencing
Relative Link TypeExample
Same directory <a href="example.html">
Child Directory <a href="images/logo.gif">
Grandchild/Descenda
nt Directory
<a href="css/images/background.gif">
Parent/Ancestor
Directory
<a href="../about.html">
<a href="../../about.html”>
Sibling Directory<a href="../images/about.html">
Root Reference <a href="/images/background.gif">

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Quick Tour of HTML Elements
Inline Text Elements …they do not disrupt the flow
•<a>
•<abbr>
•<br>
•<cite>
•<code>
•<em>
•<mark>
•<small>
•<span>
•<strong>
•<time>

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Quick Tour of HTML Elements
Images

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Quick Tour of HTML Elements
These are special characters for symbols for which
•there is either no easy way to type them via a keyboard
•or which have a reserved meaning in HTML (like“<“)
Character Entities
Entity Description
&nbsp; Nonbreakablespace
&lt; <
&gt; >
&copy; ©
&trade; ™

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Quick Tour of HTML Elements
•Unordered Lists <ul>
•Ordered Lists <ol>
•Description Lists <dl>
Lists

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Quick Tour of HTML Elements
Lists

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Chapter 3
1 2
3 4
5 6
What Is HTML and
Where Did It
Come from?
HTML Syntax
Semantic
Markup
Structure of HTML
Documents
Quick Tour of
HTML Elements
HTML5 Semantic
Structure
Elements
7
Summary

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
HTML5 Semantic Structure Elements

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
HTML5 Semantic Structure Elements
Header and Footer

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
HTML5 Semantic Structure Elements
Header and Footer
•A header element is
intended to usually
contain the section’s
heading (an h1–h6
element), but this is not
required.
•The header element can
also be used to wrap a
section’s table of
contents, a search form,
or any relevant logos.
<header>
<imgsrc="logo.gif" alt="logo" />
<h1>Fundamentals of Web
Development</h1>
...
</header>
<article>
<header>
<h2>HTML5 Semantic Structure
Elements</h2>
<p> By <em>Randy
Connolly</em></p>
</header>
...
</article>

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
HTML5 Semantic Structure Elements
<header>
<imgsrc="logo.gif" alt="logo" />
<h1>Fundamentals of Web Development</h1>
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About Us</a></li>
<li><a href="browse.html">Browse</a></li>
</ul>
</nav>
</header>
Navigation

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
HTML5 Semantic Structure Elements
•<main> is meant to contain the main unique content of
the document.
•<main> provides a semantic replacement for markupsuch
as <div id="main"> or <div id="main-content">
Main

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
HTML5 Semantic Structure Elements
<section> is a much broader element, while the
<article> element is to be used for blocks of content that
could potentially be read or consumed independently of the
other content on the page
Articles and Sections

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
HTML5 Semantic Structure Elements
Figure and Figure Captions

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
HTML5 Semantic Structure Elements
The <aside> element can be used for sidebars, pull quotes,
groups of advertising images, or any other grouping of
nonessential elements
Aside

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
HTML5 Semantic Structure Elements
Details and Summary

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Tools Insight
WYSIWYG Editors

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Tools Insight
Code Editors

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Tools Insight
Integrated Development Environments

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Tools Insight
Cloud-Based Environments

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Tools Insight
Code Playgrounds

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Chapter 3
1 2
3 4
5 6
What Is HTML and
Where Did It
Come from?
HTML Syntax
Semantic
Markup
Structure of HTML
Documents
Quick Tour of
HTML Elements
HTML5 Semantic
Structure
Elements
7
Summary

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Summary
absolute referencing
accessibility
ancestors
body
Cascading Style Sheets
(CSS)
character entity
description lists
descendants
directory
document outline
Document Object Model
Document Type
Definition
empty element
folder
head
HTML attribute
HTML validators
inline HTML elements
maintainability
markup
markup language
ordered lists
pathname
polyfill
quirks mode
Recommendations
relative referencing
root element
root reference
schemas
search engine optimization
semantic HTML
specifications
standards mode
syndication
syntax errors
tags
unordered lists
UTF-8
WHATWG
W3C
XHTML 1.0 Strict
XHTML 1.0 Transitional
Key Terms

Fundamentals of Web Development -2
nd
Ed.Randy Connolly and Ricardo Hoar
Questions
Tags