Web Design
Lecture & Discussion
Web Basics
Professor Jean Robison
Web Literacy
Syntax & Format
Markup + Style
Anchors, Resource Links
File Naming Conventions
Folder Structure
Web Literacy
Syntax & Format
Markup + Style
Anchors, Resource Links
File Naming Conventions
Folder Structure
Web Literacy
Web Literacy
html
Web Literacy
Structure/Semantics
html
Web Literacy
Structure/Semantics
Hypertext Markup Language (HTML)
html
Web Literacy
Structure/Semantics
Hypertext Markup Language (HTML)
HTML documents provide the structure of a website.
html
Web Literacy
Structure/Semantics
Hypertext Markup Language (HTML)
HTML documents provide the structure of a website. An HTML document is comprised of a system of <tags> </tags> �that describe (or “markup”) the content of a webpage.
html
Web Literacy
Structure/Semantics
Hypertext Markup Language (HTML)
HTML documents provide the structure of a website. An HTML document is comprised of a system of <tags> </tags> �that describe (or “markup”) the content of a webpage.
css
html
Web Literacy
Structure/Semantics
Hypertext Markup Language (HTML)
HTML documents provide the structure of a website. An HTML document is comprised of a system of <tags> </tags> �that describe (or “markup”) the content of a webpage.
Style/Design
html
css
Web Literacy
Structure/Semantics
Hypertext Markup Language (HTML)
HTML documents provide the structure of a website. An HTML document is comprised of a system of <tags> </tags> �that describe (or “markup”) the content of a webpage.
Style/Design
Cascading Style Sheets (CSS)
html
css
Web Literacy
Structure/Semantics
Hypertext Markup Language (HTML)
HTML documents provide the structure of a website. An HTML document is comprised of a system of <tags> </tags> �that describe (or “markup”) the content of a webpage.
Style/Design
Cascading Style Sheets (CSS)
CSS rulesets hold the visual instructions for each HTML <tag>, using selectors, {declarations: and values;}.
html
css
Web Literacy
Web Literacy
So <tags> in the HTML
html
Web Literacy
So <tags> in the HTML
html
Web Literacy
So <tags> in the HTML
html
<html>
<head>
<title>My site</title>
</head>
<body>
<h1>My site</h1>
</body>
</html>
Web Literacy
So <tags> in the HTML
Match selectors in the CSS
html
css
<html>
<head>
<title>My site</title>
</head>
<body>
<h1>My site</h1>
</body>
</html>
Web Literacy
So <tags> in the HTML
Match selectors in the CSS
html
css
<html>
<head>
<title>My site</title>
</head>
<body>
<h1>My site</h1>
</body>
</html>
Web Literacy
So <tags> in the HTML
Match selectors in the CSS
html
css
<html>
<head>
<title>My site</title>
</head>
<body>
<h1>My site</h1>
</body>
</html>
body {
background-color: green;
}
Web Literacy
So <tags> in the HTML
Match selectors in the CSS
html
css
<html>
<head>
<title>My site</title>
</head>
<body>
<h1>My site</h1>
</body>
</html>
body {
background-color: green;
}
h1 {
color: yellow;
}
Web Literacy
Web Literacy
html
Web Literacy
Structure/Semantics (HTML)
html
Web Literacy
Structure/Semantics (HTML)
+
html
Web Literacy
Structure/Semantics (HTML)
+
html
css
Web Literacy
Structure/Semantics (HTML)
+
Style/Design (CSS)
html
css
Web Literacy
Structure/Semantics (HTML)
+
Style/Design (CSS)
=
html
css
Web Literacy
Structure/Semantics (HTML)
+
Style/Design (CSS)
=
html
css
www
Web Literacy
Structure/Semantics (HTML)
+
Style/Design (CSS)
=
Browser Display (WWW)
html
css
www
Web Literacy
Structure/Semantics (HTML)
+
Style/Design (CSS)
=
Browser Display (WWW)
An Internet browser (such as Chrome, Firefox, Internet Explorer, or Safari) is software that is able to read and synthesize web-based media and coding languages, including audio/video/imagery, such as HTML, CSS, JavaScript, PHP, Python, Flash, etc.
html
css
www
Web Literacy
Syntax & Format
Markup + Style
Anchors, Resource Links
File Naming Conventions
Folder Structure
Web Literacy
Syntax & Format
Markup + Style
Anchors, Resource Links
File Naming Conventions
Folder Structure
Web Literacy
Syntax & Format
Markup + Style
Anchors, Resource Links
File Naming Conventions
Folder Structure
In linguistics, syntax refers to the arrangement of words �and phrases to create well-formed sentences.
In web design, syntax refers to the names that we use�to refer to the different elements in our HTML and CSS markup.
HTML Syntax
HTML Syntax
Structure/Semantics
html
HTML Syntax
Structure/Semantics
<html>
<head>
<title>My site</title>
</head>
<body>
<h1>My site</h1>
<h2>Welcome to my site!</h2>
</body>
</html>
html
HTML Syntax
Structure/Semantics
html
HTML Syntax
Structure/Semantics
<p>This <em>is</em> a paragraph.</p>
<img src="cat.jpg">
html
HTML Syntax
Structure/Semantics
Most HTML elements consist of an opening <tag>
<p>This <em>is</em> a paragraph.</p>
<img src="cat.jpg">
html
HTML Syntax
Structure/Semantics
Most HTML elements consist of an opening <tag> and a closing </tag>.
<p>This <em>is</em> a paragraph.</p>
<img src="cat.jpg">
html
HTML Syntax
Structure/Semantics
Most HTML elements consist of an opening <tag> and a closing </tag>. Some elements have content or other tags nested inside them.
<p>This <em>is</em> a paragraph.</p>
<img src="cat.jpg">
html
HTML Syntax
Structure/Semantics
Most HTML elements consist of an opening <tag> and a closing </tag>. Some elements have content or other tags nested inside them.
<p>This <em>is</em> a paragraph.</p>
<img src="cat.jpg">
html
HTML Syntax
Structure/Semantics
Most HTML elements consist of an opening <tag> and a closing </tag>. Some elements have content or other tags nested inside them. The image tag <img> opens and closes in the same tag (it’s an unpaired tag)…
<p>This <em>is</em> a paragraph.</p>
<img src="cat.jpg">
html
HTML Syntax
Structure/Semantics
Most HTML elements consist of an opening <tag> and a closing </tag>. Some elements have content or other tags nested inside them. The image tag <img> opens and closes in the same tag (it’s an unpaired tag), with an attribute src="" for the image source.
<p>This <em>is</em> a paragraph.</p>
<img src="cat.jpg">
html
HTML Syntax
Structure/Semantics
<p>This is a paragraph.</p>
Element:
Open tag
Element content
Close tag
html
HTML Syntax
Structure/Semantics
<p>This is a paragraph.</p>
An HTML Element has three parts:
Open tag
Element content
Close tag
html
HTML Syntax
Structure/Semantics
<p>This is a paragraph.</p>
An HTML Element has three parts:
Open tag
Element content
Close tag
html
HTML Syntax
Structure/Semantics
<p>This is a paragraph.</p>
An HTML Element has three parts:
Open tag
Element content
Close tag
html
HTML Syntax
Structure/Semantics
<p>This is a paragraph.</p>
An HTML Element has three parts:
Open tag
Element content
Close tag
html
HTML Syntax
Structure/Semantics
<img src="funny-cat.gif">
Element:
Open tag
Attribute
Value
Close tag
html
HTML Syntax
Structure/Semantics
<img src="funny-cat.gif">
An HTML Void Element has four parts:
Open tag
Attribute
Value
Close tag
html
HTML Syntax
Structure/Semantics
<img src="funny-cat.gif">
An HTML Void Element has four parts:
Open tag
Attribute
Value
Close tag
html
HTML Syntax
Structure/Semantics
<img src="funny-cat.gif">
An HTML Void Element has four parts:
Open tag
Attribute
Value
Close tag
html
HTML Syntax
Structure/Semantics
<img src="funny-cat.gif">
An HTML Void Element has four parts:
Open tag
Attribute
Attribute Value
Close tag
html
HTML Syntax
Structure/Semantics
<img src="funny-cat.gif">
An HTML Void Element has four parts:
Open tag
Attribute
Attribute Value
Close bracket
html
CSS Syntax
CSS Syntax
Style/Design
Selector
Declaration
Property
Value
css
CSS Syntax
Style/Design
p {
Xxx font-size: 12pt;
}
Selector
Declaration
Property
Value
css
CSS Syntax
Style/Design
p {
Xxx font-size: 12pt;
}
A CSS Rule Set has four parts:
Selector
Declaration
Property
Value
css
CSS Syntax
Style/Design
p {
Xxx font-size: 12pt;
}
A CSS Rule Set has four parts:
Selector {
Declaration
Property
Value
css
CSS Syntax
Style/Design
p {
Xxx font-size: 12pt;Xxxxx
}
A CSS Rule Set has four parts:
Selector {
xxxxDeclaration Block Property-Name: Property-Value; xxxx
}
Property
Value
css
CSS Syntax
Style/Design
p {
xxx font-size: 12pt; Xxx
}
A CSS Rule Set has four parts:
Selector {
xxxxDeclaration Block Property-Name: Property-Value; xxxx
}
css
CSS Syntax
Style/Design
p {
Xxx font-size: 12pt; Xxx
}
A CSS Rule Set has four parts:
Selector {
xxxxDeclaration Block Property-Name: Property-Value; xxxx
}
css
CSS Syntax
Style/Design
p {
Xxx font-size: 12pt; Xxx
}
css
CSS Syntax
Style/Design
p {
Xxx font-size: 12pt;
Xxx font-style: italic;
}
A CSS Rule Set can contain just �one Property Declaration Block… �Or two…
css
CSS Syntax
A CSS Rule Set can contain just �one Property Declaration Block… �Or two… Or three…
Style/Design
p {
Xxx font-size: 12pt;
Xxx font-style: italic;
Xxx font-weight: bold; Xxx
}
css
CSS Syntax
A CSS Rule Set can contain just �one Property Declaration Block… �Or two… Or three… Or four…
Style/Design
p {
Xxx font-size: 12pt;
Xxx font-style: italic;
Xxx font-weight: bold;
Xxx color: black;
}
css
CSS Syntax
Style/Design
p {
Xxx font-size: 12pt;
Xxx font-style: italic;
Xxx font-weight: bold;
Xxx color: black;
Xxx …
Xxx …
Xxx …Xxx
}
A CSS Rule Set can contain just �one Property Declaration Block… �Or two… Or three… Or four… �Or all of the CSS properties �(there are about 560 of them!)
css
Web Literacy
Syntax & Format
Markup + Style
Anchors, Resource Links
File Naming Conventions
Folder Structure
In linguistics, syntax refers to the arrangement of words �and phrases to create well-formed sentences.
In web design, syntax refers to the names that we use�to refer to the different elements in our HTML and CSS markup.
Web Literacy
Syntax & Format
Markup + Style
Anchors, Resource Links
File Naming Conventions
Folder Structure
In graphic design, format refers to the shape, �size, and presentation of a book or periodical.
In web design, format refers to a defined structure �for the processing, storage, or display of data.
HTML Format
Structure/Semantics
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
This configuration of �<tags> will appear in virtually every HTML page.
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
<!DOCTYPE> declares to the web what type �of file this document is.
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
The <html> tags note the beginning and ending of the markup.
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
The <head> section contains the “thinking” part of the website. �Non-visible metadata goes here.
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
The content inside �of the <title> tag appears at the top �of the internet browser window or its tabs.
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
It appears in the <head> because it modifies �the browser software, �not what is inside the display window.
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
The <link> tag connects the HTML document to the stylesheet in the CSS folder.
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
This allows the document to inherit the style instructions from CSS.
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
Indenting HTML elements is an important way to see how elements are nested together.
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
<head> and <body> are nested inside <html>, making this file more human readable, because they are one tab in from the <html> tags.
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
Learning to read non-linearly is an important coding skill.
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
Learning to read non-linearly is an important coding skill.
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
Learning to read non-linearly is an important coding skill.
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
Learning to read non-linearly is an important coding skill.
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
It would be illogical �to write (or read) �the entire markup �in a linear sense �(like a book).
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
It would be illogical �to write (or read) �the entire markup �in a linear sense �(like a book).
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
It would be illogical �to write (or read) �the entire markup �in a linear sense �(like a book).
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
It would be illogical �to write (or read) �the entire markup �in a linear sense �(like a book).
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
It would be illogical �to write (or read) �the entire markup �in a linear sense �(like a book).
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
You should learn to read HTML and CSS through and around the nested elements, �or non-linearly.
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
You should learn to read HTML and CSS through and around the nested elements, �or non-linearly.
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
You should learn to read HTML and CSS through and around the nested elements, �or non-linearly.
html
HTML Format
Structure/Semantics
<!DOCTYPE html>
<html>
xxxxxx<head>
xxxxxxxxxxxx<title>This is a title.</title>
xxxxxxxxxxxx<link rel="stylesheet" type="text/css" href="css/stylesheet.css">
xxxxxx</head>
xxxxxx<body>
xxxxxxxxxxxx<p>This is a paragraph.</p>
xxxxxx</body>
</html>
You should learn to read HTML and CSS through and around the nested elements, �or non-linearly.
html
Web Literacy
Syntax & Format
Markup + Style
Anchors, Resource Links
File Naming Conventions
Folder Structure
Web Literacy
Syntax & Format
Markup + Style
Anchors, Resource Links
File Naming Conventions
Folder Structure
HTML
Markup
Here is the given content of a website, without tags or notation.
html
Facebook Email or Phone: Password: Log In Forgot your password? �Connect with friends and the world around you on Facebook. See �photos and updates from friends in News Feed. Share what's new �in your life on your Timeline. Find more of what you're looking for �with Facebook Search. Sign Up
HTML
Markup
Without markup (i.e. structure), the browser ignores line-breaks, and sees the content as a jumbled mess. It lacks any formatting.
Facebook Email or Phone: Password: Log In Forgot your password? �Connect with friends and the world around you on Facebook. See �photos and updates from friends in News Feed. Share what's new �in your life on your Timeline. Find more of what you're looking for �with Facebook Search. Sign Up
html
HTML
Markup
<body>
<h1>Facebook</h1>
<h2>Email or Phone:</h2>
<h2>Password:</h2>
<a href="login.html">Log In</a>
<a href="forgot.html">Forgot your password?</a> �
<ul>
<li>Connect with friends and the world around you on Facebook.</li>
<li>See photos and updates from friends in News Feed.</li>
<li>Share what's new in your life on your Timeline.</li>
<li>Find more of what you're looking for with Facebook Search.</li>
</ul>
<h3><a href="signup.html">Sign Up</a></h3>
</body>
This shows the markup and content within just the <body> </body>.
(This is abbreviated, not showing the other required HTML tags, such as <html> and <head>).
html
HTML
Markup
<body>
<h1>Facebook</h1>
<h2>Email or Phone:</h2>
<h2>Password:</h2>
<a href="login.html">Log In</a>
<a href="forgot.html">Forgot your password?</a> �
<ul>
<li>Connect with friends and the world around you on Facebook.</li>
<li>See photos and updates from friends in News Feed.</li>
<li>Share what's new in your life on your Timeline.</li>
<li>Find more of what you're looking for with Facebook Search.</li>
</ul>
<h3><a href="signup.html">Sign Up</a></h3>
</body>
<h1> (24pt)
<h2> (18pt)
<h3> (14pt)
<h4> (12pt)
<h5> (10pt)
<h6> (9pt)
Heading tags identify the hierarchy of the page headings (#1-6).
html
HTML
Markup
<body>
<h1>Facebook</h1>
<h2>Email or Phone:</h2>
<h2>Password:</h2>
<a href="login.html">Log In</a>
<a href="forgot.html">Forgot your password?</a> �
<ul>
<li>Connect with friends and the world around you on Facebook.</li>
<li>See photos and updates from friends in News Feed.</li>
<li>Share what's new in your life on your Timeline.</li>
<li>Find more of what you're looking for with Facebook Search.</li>
</ul>
<h3><a href="signup.html">Sign Up</a></h3>
</body>
These tags are required for semantics and search engine optimization (SEO).
They help to identify the most important, semantically relevant information, describing what information can be found on the website.
html
HTML
Markup
<body>
<h1>Facebook</h1>
<h2>Email or Phone:</h2>
<h2>Password:</h2>
<a href="login.html">Log In</a>
<a href="forgot.html">Forgot your password?</a> �
<ul>
<li>Connect with friends and the world around you on Facebook.</li>
<li>See photos and updates from friends in News Feed.</li>
<li>Share what's new in your life on your Timeline.</li>
<li>Find more of what you're looking for with Facebook Search.</li>
</ul>
<h3><a href="signup.html">Sign Up</a></h3>
</body>
<a> tags are anchors, more commonly known as “hyperlinks” or “links”. These tags allow users to navigate to external websites or to local subpages.
The href=" " attribute contains the path to the target page. In this example, they use partial URLs on the local directory (in the same folder).
html
HTML
Markup
<body>
<h1>Facebook</h1>
<h2>Email or Phone:</h2>
<h2>Password:</h2>
<a href="login.html">Log In</a>
<a href="forgot.html">Forgot your password?</a> �
<ul>
<li>Connect with friends and the world around you on Facebook.</li>
<li>See photos and updates from friends in News Feed.</li>
<li>Share what's new in your life on your Timeline.</li>
<li>Find more of what you're looking for with Facebook Search.</li>
</ul>
<h3><a href="signup.html">Sign Up</a></h3>
</body>
<ol> ordered lists and <ul> unordered lists allow you to create bulleted or numbered lists.
<ul> is used here because the four links �on the page are not inherently ordered.
<ol> would be appropriate for driving directions, cooking recipes, etc.
html
HTML
Markup
<body>
<h1>Facebook</h1>
<h2>Email or Phone:</h2>
<h2>Password:</h2>
<a href="login.html">Log In</a>
<a href="forgot.html">Forgot your password?</a> �
<ul>
<li>Connect with friends and the world around you on Facebook.</li>
<li>See photos and updates from friends in News Feed.</li>
<li>Share what's new in your life on your Timeline.</li>
<li>Find more of what you're looking for with Facebook Search.</li>
</ul>
<h3><a href="signup.html">Sign Up</a></h3>
</body>
<li> tags identify the individual elements within the list.
By default, where ever you see <li> in HTML, you will see a bullet or number in the browser.
html
HTML
Markup
Email or Phone:
Password:
Log In Forgot your password? �
• Connect with friends and the world around you on Facebook.
• See photos and updates from friends in News Feed.
• Share what's new in your life on your Timeline.
• Find more of what you're looking for with Facebook Search.
Sign Up
The browser would display these tags in this way by default.
html
HTML
HTML
Markup
html
HTML + CSS
Markup
html
HTML + CSS
Markup + Style
html
css
HTML + CSS
Markup + Style
<body>
<h1>Facebook</h1>
<h2>Email or Phone:</h2>
<h2>Password:</h2>
<a href="login.html">Log In</a>
<a href="forgot.html">Forgot your password?</a> �
<ul>
<li>Connect with friends and the world around you on Facebook.</li>
<li>See photos and updates from friends in News Feed.</li>
<li>Share what's new in your life on your Timeline.</li>
<li>Find more of what you're looking for with Facebook Search.</li>
</ul>
<h3><a href="signup.html">Sign Up</a></h3>
</body>
Here are some of the default settings that most web browsers apply to our HTML.
body {
background-color: white;
}
h1, h2, h3 {
font-family: "Times New Roman", serif;
font-weight: bold;
color: black;
}
h1 {
font-size: 24pt;
}
h2 {
font-size: 18pt;
}
h3 {
font-size: 14pt;
}
html
css
HTML + CSS
Markup + Style
<body>
<h1>Facebook</h1>
<h2>Email or Phone:</h2>
<h2>Password:</h2>
<a href="login.html">Log In</a>
<a href="forgot.html">Forgot your password?</a> �
<ul>
<li>Connect with friends and the world around you on Facebook.</li>
<li>See photos and updates from friends in News Feed.</li>
<li>Share what's new in your life on your Timeline.</li>
<li>Find more of what you're looking for with Facebook Search.</li>
</ul>
<h3><a href="signup.html">Sign Up</a></h3>
</body>
Here are some of the default settings that most web browsers apply to our HTML.
body {
background-color: white;
}
h1, h2, h3 {
font-family: "Times New Roman", serif;
font-weight: bold;
color: black;
}
h1 {
font-size: 24pt;
}
h2 {
font-size: 18pt;
}
h3 {
font-size: 14pt;
}
css
html
HTML + CSS
Markup + Style
Let’s mess with the default settings using Cascading Style Sheets (CSS)!
css
html
HTML + CSS
Markup + Style
<body>
<h1>Facebook</h1>
<h2>Email or Phone:</h2>
<h2>Password:</h2>
<a href="login.html">Log In</a>
<a href="forgot.html">Forgot your password?</a> �
<ul>
<li>Connect with friends and the world around you on Facebook.</li>
<li>See photos and updates from friends in News Feed.</li>
<li>Share what's new in your life on your Timeline.</li>
<li>Find more of what you're looking for with Facebook Search.</li>
</ul>
<h3><a href="signup.html">Sign Up</a></h3>
</body>
Let’s mess with the default settings using Cascading Style Sheets (CSS)!
css
html
HTML + CSS
Markup + Style
<body>
<h1>Facebook</h1>
<h2>Email or Phone:</h2>
<h2>Password:</h2>
<a href="login.html">Log In</a>
<a href="forgot.html">Forgot your password?</a> �
<ul>
<li>Connect with friends and the world around you on Facebook.</li>
<li>See photos and updates from friends in News Feed.</li>
<li>Share what's new in your life on your Timeline.</li>
<li>Find more of what you're looking for with Facebook Search.</li>
</ul>
<h3><a href="signup.html">Sign Up</a></h3>
</body>
Let’s mess with the default settings using Cascading Style Sheets (CSS)!
body {
background-color: magenta;
}
h1 {
font-family: "Comic Sans MS", cursive;
font-size: 36pt;
}
h2 {
font-family: "Impact", sans-serif;
color: cyan;
}
h3 {
font-family: "Courier", serif;
}
li {
background-color: white;
}
css
html
HTML + CSS
Markup + Style
<body>
<h1>Facebook</h1>
<h2>Email or Phone:</h2>
<h2>Password:</h2>
<a href="login.html">Log In</a>
<a href="forgot.html">Forgot your password?</a> �
<ul>
<li>Connect with friends and the world around you on Facebook.</li>
<li>See photos and updates from friends in News Feed.</li>
<li>Share what's new in your life on your Timeline.</li>
<li>Find more of what you're looking for with Facebook Search.</li>
</ul>
<h3><a href="signup.html">Sign Up</a></h3>
</body>
Let’s mess with the default settings using Cascading Style Sheets (CSS)!
body {
background-color: magenta;
}
h1 {
font-family: "Comic Sans MS", cursive;
font-size: 36pt;
}
h2 {
font-family: "Impact", sans-serif;
color: cyan;
}
h3 {
font-family: "Courier", serif;
}
li {
background-color: white;
}
css
html
HTML + CSS
Markup + Style
<body>
<h1>Facebook</h1>
<h2>Email or Phone:</h2>
<h2>Password:</h2>
<a href="login.html">Log In</a>
<a href="forgot.html">Forgot your password?</a> �
<ul>
<li>Connect with friends and the world around you on Facebook.</li>
<li>See photos and updates from friends in News Feed.</li>
<li>Share what's new in your life on your Timeline.</li>
<li>Find more of what you're looking for with Facebook Search.</li>
</ul>
<h3><a href="signup.html">Sign Up</a></h3>
</body>
Let’s mess with the default settings using Cascading Style Sheets (CSS)!
body {
background-color: magenta;
}
h1 {
font-family: "Comic Sans MS", cursive;
font-size: 36pt;
}
h2 {
font-family: "Impact", sans-serif;
color: cyan;
}
h3 {
font-family: "Courier", serif;
}
li {
background-color: white;
}
css
html
HTML + CSS
Markup + Style
<body>
<h1>Facebook</h1>
<h2>Email or Phone:</h2>
<h2>Password:</h2>
<a href="login.html">Log In</a>
<a href="forgot.html">Forgot your password?</a> �
<ul>
<li>Connect with friends and the world around you on Facebook.</li>
<li>See photos and updates from friends in News Feed.</li>
<li>Share what's new in your life on your Timeline.</li>
<li>Find more of what you're looking for with Facebook Search.</li>
</ul>
<h3><a href="signup.html">Sign Up</a></h3>
</body>
Let’s mess with the default settings using Cascading Style Sheets (CSS)!
body {
background-color: magenta;
}
h1 {
font-family: "Comic Sans MS", cursive;
font-size: 36pt;
}
h2 {
font-family: "Impact", sans-serif;
color: cyan;
}
h3 {
font-family: "Courier", serif;
}
li {
background-color: white;
}
css
html
HTML + CSS
Markup + Style
<body>
<h1>Facebook</h1>
<h2>Email or Phone:</h2>
<h2>Password:</h2>
<a href="login.html">Log In</a>
<a href="forgot.html">Forgot your password?</a> �
<ul>
<li>Connect with friends and the world around you on Facebook.</li>
<li>See photos and updates from friends in News Feed.</li>
<li>Share what's new in your life on your Timeline.</li>
<li>Find more of what you're looking for with Facebook Search.</li>
</ul>
<h3><a href="signup.html">Sign Up</a></h3>
</body>
Let’s mess with the default settings using Cascading Style Sheets (CSS)!
body {
background-color: magenta;
}
h1 {
font-family: "Comic Sans MS", cursive;
font-size: 36pt;
}
h2 {
font-family: "Impact", sans-serif;
color: cyan;
}
h3 {
font-family: "Courier", serif;
}
li {
background-color: white;
}
css
html
HTML + CSS
Markup + Style
<body>
<h1>Facebook</h1>
<h2>Email or Phone:</h2>
<h2>Password:</h2>
<a href="login.html">Log In</a>
<a href="forgot.html">Forgot your password?</a> �
<ul>
<li>Connect with friends and the world around you on Facebook.</li>
<li>See photos and updates from friends in News Feed.</li>
<li>Share what's new in your life on your Timeline.</li>
<li>Find more of what you're looking for with Facebook Search.</li>
</ul>
<h3><a href="signup.html">Sign Up</a></h3>
</body>
Let’s mess with the default settings using Cascading Style Sheets (CSS)!
body {
background-color: magenta;
}
h1 {
font-family: "Comic Sans MS", cursive;
font-size: 36pt;
}
h2 {
font-family: "Impact", sans-serif;
color: cyan;
}
h3 {
font-family: "Courier", serif;
}
li {
background-color: white;
}
css
html
HTML + CSS
Markup + Style
Email or Phone:
Password:
Log In Forgot your password? �
• Connect with friends and the world around you on Facebook.
• See photos and updates from friends in News Feed.
• Share what's new in your life on your Timeline.
• Find more of what you're looking for with Facebook Search.
Sign Up
Wow!
Much doge!
Amaze!
Very internet!
css
html
HTML + CSS
Markup + Style
Email or Phone:
Password:
Log In Forgot your password? �
• Connect with friends and the world around you on Facebook.
• See photos and updates from friends in News Feed.
• Share what's new in your life on your Timeline.
• Find more of what you're looking for with Facebook Search.
Sign Up
Cool! We were able to go from this very boring, default style website…
css
html
HTML + CSS
Markup + Style
Email or Phone:
Password:
Log In Forgot your password? �
• Connect with friends and the world around you on Facebook.
• See photos and updates from friends in News Feed.
• Share what's new in your life on your Timeline.
• Find more of what you're looking for with Facebook Search.
Sign Up
Cool! We were able to go from this very boring, default style website to this really awesome looking website…
css
html
HTML + CSS
Markup + Style
Email or Phone:
Password:
Log In Forgot your password? �
• Connect with friends and the world around you on Facebook.
• See photos and updates from friends in News Feed.
• Share what's new in your life on your Timeline.
• Find more of what you're looking for with Facebook Search.
Sign Up
Cool! We were able to go from this very boring, default style website to this really awesome looking website using just a few CSS rule sets, properties, and property declarations!
body {
background-color: magenta;
}
h1 {
font-family: "Comic Sans MS", cursive;
font-size: 36pt;
}
h2 {
font-family: "Impact", sans-serif;
color: cyan;
}
h3 {
font-family: "Courier", serif;
}
li {
background-color: white;
}
css
html
Web Literacy
Syntax & Format
Markup + Style
Anchors, Resource Links
File Naming Conventions
Folder Structure
Web Literacy
Syntax & Format
Markup + Style
Anchors, Resource Links
File Naming Conventions
Folder Structure
Anchors
Anchors
The <a> anchor tag </a> defines a hyperlink connection between two pages.
The <a> anchor tag </a> can be applied �to any element on the page: words, images, shapes, videos, etc.
Anchors
Anchors
External Anchors
Anchors
External Anchors
<a href="https://www.google.com">Google</a>
Anchors
External Anchors
<a href="https://www.google.com">Google</a>
External <a> anchors use the absolute URL of the �target page within the href=" " attribute value.
Anchors
External Anchors
<a href="https://www.google.com">Google</a>
Internal/Local Anchors
Anchors
External Anchors
<a href="https://www.google.com">Google</a>
Internal/Local Anchors
<a href="vacation/europe.html">Europe</a>
Internal or local <a> anchors specify a path using the forward slash symbol "/" to navigate from the current HTML file to the directory and file that you are trying to link.
Anchors
External Anchors
<a href="https://www.google.com">Google</a>
Internal/Local Anchors
<a href="vacation/europe.html">Europe</a>
In this case, the <a> anchor tag tells the internet browser to navigate into a directory (folder) called "vacation", then to find and open the HTML file in that directory (folder) called "europe.html"
Anchors
External Anchors
<a href="https://www.google.com">Google</a>
Internal/Local Anchors
<a href="vacation/europe.html">Europe</a>
<a href="../index.html">Main Page</a>
From within any directory (folder), you can use "../" to back out �of a directory (folder), in this case, to get back to the root directory.
Anchors
External Anchors
<a href="https://www.google.com">Google</a>
Internal/Local Anchors
<a href="vacation/europe.html">Europe</a>
<a href="../index.html">Main Page</a>
The browser displays only the content between �the opening <a> and the closing </a> tags.
Web Literacy
Syntax & Format
Markup + Style
Anchors, Resource Links
File Naming Conventions
Folder Structure
Web Literacy
Syntax & Format
Markup + Style
Anchors, Resource Links
File Naming Conventions
Folder Structure
External Resource Links
External Resource Links
The <link> resource link tag defines a connection between the HTML document and a resource document that it can use.
Typically, we only use the resource <link> tag to connect CSS stylesheets to our HTML page. The <link> tag is a “self-closing” or void element, so we don’t need a </link>.
External Resource Links
Local External Resource Link
External Resource Links
Local External Resource Link
<head>
xx<link type="text/css" rel="stylesheet" href="css/stylesheet.css">
</head>
External Resource Links
Local External Resource Link
<head>
xx<link type="text/css" rel="stylesheet" href="css/stylesheet.css">
</head>
I’m declaring a link to a resource file
External Resource Links
Local External Resource Link
<head>
xx<link type="text/css" rel="stylesheet" href="css/stylesheet.css">
</head>
I’m declaring a link to a resource file
The type of resource file is a text file in the form of CSS
External Resource Links
Local External Resource Link
<head>
xx<link type="text/css" rel="stylesheet" href="css/stylesheet.css">
</head>
I’m declaring a link to a resource file
The type of resource file is a text file in the form of CSS
Its relation to the HTML is that it is the CSS stylesheet
External Resource Links
Local External Resource Link
<head>
xx<link type="text/css" rel="stylesheet" href="css/stylesheet.css">
</head>
I’m declaring a link to a resource file
The type of resource file is a text file in the form of CSS
Its relation to the HTML is that it is the CSS stylesheet
The styles are called "stylesheet.css" in the folder "css"
Web Literacy
Syntax & Format
Markup + Style
Anchors, Resource Links
File Naming Conventions
Folder Structure
Web Literacy
Syntax & Format
Markup + Style
Anchors, Resource Links
File Naming Conventions
Folder Structure
File Naming Conventions
File Naming Conventions
If one of your hyperlinks doesn’t work correctly, or if any image on your page is broken the problem may be that the names of your files or folders are not correctly formatted.
Follow these simple rules to help avoid page errors!
File Naming Conventions
Best Practices for Naming Files
File Naming Conventions
Best Practices for Naming Files
no%20spaces%20ever.html
File Naming Conventions
Best Practices for Naming Files
no%20spaces%20ever.html
hyphens-are-ok.html
File Naming Conventions
Best Practices for Naming Files
no%20spaces%20ever.html
hyphens-are-ok.html
underscores_are_also_cool.html
File Naming Conventions
Best Practices for Naming Files
no%20spaces%20ever.html
hyphens-are-ok.html
underscores_are_also_cool.html
NEVER-UPPERCASE-EVER.html
File Naming Conventions
Best Practices for Naming Files
no%20spaces%20ever.html
hyphens-are-ok.html
underscores_are_also_cool.html
NEVER-UPPERCASE-EVER.html
always-lowercase-everything.html
File Naming Conventions
Best Practices for Naming Files
no%20spaces%20ever.html
hyphens-are-ok.html
underscores_are_also_cool.html
NEVER-UPPERCASE-EVER.html
always-lowercase-everything.html
nº--$pe©i@l--©h@®@çters!!!!.html
File Naming Conventions
These are special characters, they are bad!
& ampersand ‘ apostrophe @ at sign
* asterisk \ back slash / forward slash
` backtick blank spaces : colon $ dollar sign
= equal sign ! exclamation point
< left angle bracket > right angle bracket
{ left bracket } right bracket
% percent | pipe + plus sign
# pound “ ” quotes ? question mark
File Naming Conventions
Best Practices for Naming Files
no%20spaces%20ever.html
hyphens-are-ok.html
underscores_are_also_cool.html
NEVER-UPPERCASE-EVER.html
always-lowercase-everything.html
nº--$pe©i@l--©h@®@çters!!!!.html
less-than-thirty-letters-long.html
Web Literacy
Syntax & Format
Markup + Style
Anchors, Resource Links
File Naming Conventions
Folder Structure
Web Literacy
Syntax & Format
Markup + Style
Anchors, Resource Links
File Naming Conventions
Folder Structure
Folder Structure
Folder Structure
Root Directory
The folder that you submit all of your HTML and CSS files in should be labeled with the first two letters of your first name, a dash symbol, and the first two letters of your last name (no spaces, no capital letters).
fi-la
Folder Structure
Root Directory
The folder that you submit all of your HTML and CSS files in should be labeled with the first two letters of your first name, a dash symbol, and the first two letters of your last name (no spaces, no capital letters). So, if your name is Firstname Lastname, your root directory folder should be called: fi-la
fi-la
Folder Structure
Root Directory
fi-la
Folder Structure
Root Directory
Index index.html
html
fi-la
Folder Structure
Root Directory
Index index.html
�
We’ve already learned �that the index.html file is our main website
html
fi-la
Folder Structure
Root Directory
Index index.html
html
fi-la
Folder Structure
Root Directory
Index index.html
CSS Folder stylesheet.css
html
css
css
fi-la
Folder Structure
Root Directory
Index index.html
CSS Folder stylesheet.css
The CSS file controls the page styles,�and should be placed in a sub-folder �to keep the root directory neat and orderly
html
css
css
fi-la
Folder Structure
Root Directory
Index index.html
CSS Folder stylesheet.css
html
css
css
fi-la
Folder Structure
Root Directory
Index index.html
CSS Folder stylesheet.css
Images Folder
css
html
img
css
fi-la
Folder Structure
Root Directory
Index index.html
CSS Folder stylesheet.css
Images Folder
Images should also be placed �in their own sub-folder so that they �don’t clutter-up the root directory folder
css
html
img
css
fi-la
Folder Structure
Root Directory
Index index.html
CSS Folder stylesheet.css
Images Folder
css
html
img
css
fi-la
Folder Structure
Root Directory
Index index.html
CSS Folder stylesheet.css
Images Folder
Pages Folder
css
html
html
html
html
html
css
html
img
pages
fi-la
Folder Structure
Root Directory
Index index.html
CSS Folder stylesheet.css
Images Folder
Pages Folder
Finally, sub-pages (like your �exercise and project assignment �submissions) should be placed �in a sub-folder called “pages”
css
html
html
html
html
html
css
html
img
pages
fi-la
Folder Structure
Root Directory
Index index.html
CSS Folder stylesheet.css
Images Folder
Pages Folder
css
html
html
html
html
html
css
html
img
pages
fi-la
Folder Structure
Root Directory
Rather than re-creating a new root directory folder each week, you should just use the same root directory folder and index.html file.
fi-la
Folder Structure
Root Directory
Rather than re-creating a new root directory folder each week, you should just use the same root directory folder and index.html file. Then simply add your new assignment submission HTML file into the pages folder, along with an anchor tag link to the new assignment web page.
fi-la
Folder Structure
Root Directory
For this class, please note that your root directory folder size should never exceed 40 MB.
fi-la
Folder Structure
Root Directory
For this class, please note that your root directory folder size should never exceed 40 MB. This means that you need to be very thoughtful about the resolution and dimensions of the images (especially PNG and GIF files) that you use on your website.
fi-la
Folder Structure
Root Directory
Warning! Submitting a root directory folder that is larger than the maximum limit of 40 MB will negatively impact your class participation grade!
fi-la
Web Literacy
Syntax & Format
Markup + Style
Anchors, Resource Links
File Naming Conventions
Folder Structure
Web Literacy
Syntax & Format
Markup + Style
Anchors, Resource Links
File Naming Conventions
Folder Structure
Web Design is an open-source learning resource.
Class material developed by Ian Besler.�
Licensed under a Creative Commons�Attribution-NonCommercial-ShareAlike�4.0 International License.