Brenton Strine

Brenton Strine

Links

Slide Duration:

Table of Contents

Section 1: HTML
Your First Web Page

17m 1s

Intro
0:00
World Wide Web
0:23
Introduction to HTML
0:25
Looking at Source Code
0:53
HTML5
1:58
HTML5 Specification
1:59
Creating a Web Page
4:10
What You Will Need to Create a Web Page
4:11
Example: Basic Web Page
4:40
Example: Creating a Web Page
5:46
HTML Elements
6:33
Adding a Title
7:08
Main Body
7:48
First Level Heading
8:23
Adding an Image
8:42
Paragraph
9:09
Adding a List and URLs
11:13
Footer
14:09
CSS: Styling
16:02
Web Basics and Web History

32m 23s

Intro
0:00
The Web
0:56
Overview of the Web
0:58
The Web Page
2:39
Overview of the Web Page
2:40
Web Technologies
4:45
Overview of Web Technologies
4:46
The Web Today
9:22
The Web Today
9:23
What is HTML
11:22
HyperText Markup Language
11:23
The Creation of the Internet
12:40
History of the Internet
12:41
Developments in HTML
14:10
The Birth of HTML
14:11
Early Problems
15:35
Early Browsers
16:24
History of Early Browsers
16:25
NCSA Mosaic
17:55
NCSA Mosaic
17:56
The Browser Wars Begin
19:39
History of the Browser Wars
19:40
Casualties of War
22:27
Results of the Browser Wars
22:28
HTML 4 Stabilization
25:31
History and Overview of HTML4
25:32
Modern Browser Developments
27:27
Modern Browsers
27:29
HTML5
30:57
Overview of HTML5
30:58
Web Development Tools

26m 28s

Intro
0:00
Browsers
0:17
Introduction to Browsers
0:18
Example: Browsers
2:35
Firefox Add-ons
3:14
Firefox Browser
3:15
Example: Firebug Add-ons
3:54
Example: Web Developer Toolbar and ColorZilla
7:51
Domain Names and Hosting
10:23
Overview of Domain Names and Hosting
10:24
Your Own Domain
11:03
Installing a Local Web Server
12:42
Installing a Local Web Server
12:43
Apache Web
13:29
WYSIWYG Editors
15:56
Introduction to WYSIWYG Editors
15:57
Content Management System
18:31
How Content Management System Works
18:32
Example: WordPress
20:00
File Transfer Protocol
22:26
File Transfer Protocol
22:27
HTML Elements and Attributes

21m 50s

Intro
0:00
Proper use of Elements and Attributes
0:14
Elements and Attributes
0:16
Example
1:06
Normal HTML Elements
2:00
Start Tag, Content, and End Tag
2:02
Example: Warning!
2:34
Void HTML Elements
3:23
Self-Closing Tags
3:24
List of Void Elements
4:04
Example: Line Break
5:00
HTML Comments
6:13
Purpose of Comment Tags
6:14
Example: Comment Tags
6:50
Attributes
7:25
Properties of Attributes
7:27
Example: Attributes
7:39
Example: Whitespace
10:22
HTML Character Codes
12:05
Character References
12:07
Example: Registered Trademark Symbol
12:35
Example: Using Character References
13:23
Example: Start Tag and End Tag
15:57
Example: Self-Closing Tag
16:37
Example: Attributes
17:37
Example: Proper use of Elements and Attributes
19:02
Example: Comment
20:09
Example: Whitespace
20:46
Essential Tags Part 1

41m 42s

Intro
0:00
Document Structure Tags
1:13
Document Structure Tags and Example
1:14
Layout Tags
3:24
Layout Tags
3:26
Example: Layout Tags
7:48
Example: Layout Tags
11:28
Example: Layout Tags
13:17
Example: Layout Tags
14:22
Text Level Tags
17:22
Text Level Tags
17:23
Example: Text Level Tags
17:48
Grouping Content Tags
24:23
Grouping Content Tags
24:24
<p> Tag
24:45
<hr> Tag
25:31
<figure>, <figcaption>, and <blockquote> Tag
26:14
<div> Tag
26:58
Example: Grouping Content Tags
27:28
Embedded Content Tags
33:12
Embedded Content Tags
33:13
Example: Embedded Content Tags
35:39
Essential Tags Part 2

24m 20s

Intro
0:00
Simple Tables
0:17
Simple Tables
0:19
Example: Simple Tables
2:31
Semantic Tables
5:11
Semantic Tables
5:14
Example: Semantic Tables
6:24
Simple Lists
8:14
Simple Lists
8:18
Unordered List
8:36
Ordered List
8:42
Example: Simple Lists
9:37
Definition Lists
14:08
Definition Lists
14:09
Example: Definition Lists
15:21
Forms
17:11
Forms
17:12
Example: Forms
17:52
Markup Language

29m 38s

Intro
0:00
HTML 1 Through 3.2
0:13
Period of Rapid Growth of HTML
0:14
Tag Soup
2:03
Definition of Tag Soup
2:04
Example: Tag Soup
3:00
Example: Tag Soup and Valid Doctype
4:45
HTML 4.01
5:26
Overview of HTML 4.01
5:27
Three Flavors of HTML 4.01: Strict, Transitional, and Frameset
6:05
XHTML 1
7:19
Overview of XHTML 1
7:20
Example: XHTML 1
9:20
XHTML1 Syntax
11:48
Lower Case Rule
11:49
Closed Elements Rule
12:25
Encased in Quotes Rule
14:18
Boolean Attributes May Not Be Minimized
14:35
Correct Nesting is Enforced
15:29
The Problem with XHTML
16:15
Problem with XHTML
16:16
XHTML 2
19:22
Overview of XHTML 2
19:23
HTML 5
20:43
Overview of HTML 5
20:44
Validating
22:44
Validators
22:45
Example: W3C Markup Validation Service
25:26
Page Structure and Meta-data Elements

32m 50s

Intro
0:00
The Doctype
0:12
Doctype
0:13
Example: Doctype
1:25
The Root Element
1:57
Root Element
1:58
Example: Root Element
2:45
The Head Element
3:38
Head Element and Body Element
3:39
Example: Head Element and Body Element
5:06
The Head Element
5:42
Head Element vs. Header Element
5:47
The Title Element
6:51
Title Element
6:52
Example: Title Element
7:54
The Base Element
9:00
Base Element
9:03
Example: Base Element
9:42
The Link Element
14:07
Link Element: rel, type, and href
14:08
Example: Link Element
15:13
The Meta Element
17:54
Meta Element: charset, name, and http-equiv
17:55
Example: Meta Element
21:00
The Style Element
23:35
Style Element
23:37
Example: Style Element
24:40
Text-Level Semantics

30m 13s

Intro
0:00
Text Level Semantics
0:06
Paragraph Level
0:07
The <a> Element
2:23
Definition of the <a> Element
2:25
The <em> Element
3:25
Definition of the <em> Element
3:26
The <strong> Element
6:50
The <strong> Element
6:51
The <small> Element
8:35
The <small> Element
8:36
Example of <small> Element
10:19
The <cite> Element
10:55
The <cite> Element
10:56
Example of <cite> Element
12:32
The <q> Element
12:45
The <q> Element
12:46
Example of <q> Element
13:34
The <abbr> Element
15:35
The <abbr> Element
15:36
Example of <abbr> Element
16:41
The <dfn> Element
17:03
The <dfn> Element
17:04
Example of <dfn> Element
18:01
The <time> Element
19:11
The <time> Element and Example
19:12
The <code> Element
21:18
The <code> Element
21:19
Example of <code> Element
23:00
The <sub> and <sup> Elements
23:31
The <sub> and <sup> Elements
23:32
Example of <sub> and <sup> Elements
23:50
The <i> Element
24:51
The <i> Element and Example
24:52
The <b> Element
27:16
The <b> Element
27:17
Example of <b> Element
29:07
Heading and Sectioning

23m 39s

Intro
0:00
Heading Elements
0:06
Heading Tags
0:07
Heading Rules
1:13
Heading Rules and Example
1:35
Sectioning Roots
5:39
Sectioning Roots
5:41
Sectioning Contents
6:25
Sectioning Content Elements
6:27
Section Wrapping
7:40
Section Wrapping
7:41
Example: Section Wrapping
10:10
Real World Example 1
15:36
Forms

47m 51s

Intro
0:00
Form Terminology
0:23
Form
0:24
Control
0:43
Control Name and Control Label
1:09
Input Type and State
1:52
Form Controls
2:20
Button: Submit and Reset
2:32
Radio
3:37
Checkbox
4:00
Select Menu
4:05
Textarea
4:28
Various Input Types
4:38
Example: Basic Controls of Form Element
7:05
Example: Buttons
18:20
Example: Additional Controls
20:56
Example: Special Input Types
27:55
Example: Date and Time Control
33:40
Example: Create Your Own Control
37:32
Example: Placeholder Text
39:10
Example: Datalist
41:43
Example: Sizing and Input Containment
42:16
Example: Select Modification
42:51
Example: Required Attribute
44:41
Links

36m 41s

Intro
0:00
URIs and URLs
0:23
Definitions of URL and URI
0:36
Differences Between URL and URI
0:42
Example: URI and URL
1:14
Typical URI Construction
2:33
Domain and Subdomain
2:34
Protocol
4:18
IP Address
5:05
Typical URI Construction
5:32
Second Level Domain
5:33
Port
6:07
Foldernames
6:46
Typical URI Construction
8:06
Filename and File Extension
8:08
Typical URI Construction
10:38
Name/ Value Pairs
10:40
Internal Anchors
11:45
Typical URI Construction
12:30
Example: URI Construction
12:31
Relative and Absolute URIs
14:20
Relative and Absolute URIs
14:22
Example: Relative and Absolute URIs
18:32
Link States
24:15
Link States
24:16
Example: Link States
25:18
Block Level Links
27:02
Example: Block Level Links
27:03
Bookmark Links
29:18
Bookmark Links
29:20
Example: Bookmark Links
30:15
Attributes
32:06
href and target
32:20
rel, media, hreflang, and type
33:18
Embedded Content

46m 5s

Intro
0:00
Embedding Image
0:22
Embedding an Image
0:25
Image File Formats
3:38
Image Format: Jpg
3:42
Image Format: Png
4:13
Image Format: Gif
4:40
Compression
6:05
Image Format: Precise Lines and Fewer Colors
8:38
Animated Gif
10:49
Alpha Transparency Png
11:09
Embedding Audio
12:52
Old Way of Embedding Audio
13:00
New Way of Embedding Audio
14:54
Example: Adding Buttons
20:04
Message for Users
26:36
Audio Attributes
27:46
Control
28:29
Autoplay
28:44
Loop
29:36
Preload
30:40
Embedding Video
32:00
Embedding Video
32:11
Controls
34:22
Poster Attributes
36:01
Video Formats
37:36
Solving Formatting Problem
39:26
The Canvas Element

19m 25s

Intro
0:00
Creating the Element
0:38
What is the Canvas Element?
0:39
HTML and Canvas Element
1:48
Example: Canvas Element
3:23
Creating the Canvas in JavaScript
5:13
getContext() Method
5:17
Checking Browser Support with the getContext() Method
6:00
Example: Creating the Canvas in JavaScript
7:31
Drawing in the Canvas
10:13
Methods for Drawing in the Canvas
10:14
2d Context
10:58
Example: Creating Drawing in the Canvas
11:39
Example: Adding an Image and Texts
15:30
Example: Advance Canvas Element
17:31
Content Models

29m 8s

Intro
0:00
The HTML 4.01 Content Model
0:16
Block Elements and Inline Elements
0:18
Example: Block Elements and Inline Elements
1:18
W3C Markup Validation Service
3:28
The HTML5 Content Model
6:21
Overview of HTML5 New Content Categories
6:22
Flow Content
8:02
Specification for Content Models
8:05
Flow Content
9:41
Example: Flow Content Elements
10:40
List of Flow Content
11:35
BlockQuote Element
11:50
Sectioning Content
13:19
Introduction to Sectioning Content
13:20
Heading Content
14:06
Heading Content and hgroup Element
14:07
Phrasing Content
16:56
Attributes of Phrasing Content
16:57
Anchor Element in Phrasing Content
17:28
Embedded Content
19:33
Attributes of Embedded Content
19:34
No Content
19:53
Transparent Content
20:38
Source Elements and Param Elements
21:15
Interactive Content
24:16
Interactive Content Elements
24:17
Button Element
25:57
The DOM

13m 10s

Intro
0:00
The DOM
0:26
Document Object Model
0:27
The DOM Tree
0:55
DOM Trees
0:56
Example: DOM Tree
1:31
Vocabulary: Tree, Node,Branch, Parent, Child
2:15
Exploring the DOM
3:13
Example: Built-in Browser Inspection and Firebug
3:15
Example: Manually Exploring the DOM
6:01
JavaScript
7:28
DOM Navigation Techniques
7:55
DOM Navigation Techniques
7:56
Favicons

13m 14s

Intro
0:00
Favorite Icons
0:08
Function of Favorite Icons
0:09
Bowser Support
1:10
Browser Support
1:13
Location in Browsers
1:46
Implementation Methods
2:04
Implementation Methods for Favorite Icons
2:05
Favicon and Apple Mobile Devices
4:51
Creating the Icon
6:13
How to Create the Icon
6:14
Favicon Resources
9:10
Websites for Icon Creation and Conversion
9:11
Programs for Icon Creation and Conversion
11:50
Embedding Flash and Other Objects

15m 7s

Intro
0:00
Flash and other Plug-ins
0:41
Main Problems with Flash
0:44
Benefits of Flash
2:02
Embedding Flash: the Old Way
2:57
The Old Way to Embed Flash
2:58
Embedding Flash: the Satay Method
6:42
Satay Method
6:43
Embedding Flash: HTML5
9:28
How to Embed Flash in HTML5
9:29
Embedding Flash Directly in <video>
11:39
Embedding Flash Directly in Video Element
11:40
Review of Embedding
13:24
Image Elements
13:39
Video, Audio, and Canvas Elements
13:44
Embed Elements
13:53
Object Elements
14:04
Offline Cache

19m 53s

Intro
0:00
Purpose
0:47
Purpose of Offline Cache
0:48
The Appache
2:06
Attributes of Appcache
2:07
The Manifest File
3:22
Manifest File
3:23
Example of Manifest
3:32
Section Headers: Cache, Fallback, and Network
4:21
Server-Side Considerations
5:17
text/cache-manifest MIME-type
5:18
Other Server-Side Considerations
5:41
ExpiresActive On and ExpiresDefault 'access'
6:07
Example: Offline Cache 1
7:44
Example: Overwriting Files
11:09
Example: Wild Cards for Network
14:58
Example: Offline Cache 2
16:06
Web Development Principles

26m 47s

Intro
0:00
Interoperability
0:36
Interoperability of Web Development
0:37
Interoperable Websites Should Work
3:05
Qualities of Interoperable Websites
3:06
Backward Compatibility
5:52
Compatibility With Older Technology
5:53
Example: Meta Tag
9:07
Forward Compatibility
9:33
Advancement in Technology
9:34
Accessibility
10:11
Accessibility of Content
10:12
Semantic Code
11:43
Example: Where Will This Link Take You?
13:56
Graceful Degradation
14:59
Graceful Degradation or Fault Tolerance
15:00
Types of Degradation
16:35
Progressive Enhancement
18:36
Progressive Enhancement
18:37
Future Detection and Browser Sniffing
21:05
Future Detection Versus Browser Sniffing
21:06
Example: Email Input Type
23:39
Tim Berners-Lee's Quote
26:20
Loading...
This is a quick preview of the lesson. For full access, please Log In or Sign up.
For more information, please see full course syllabus of HTML
Bookmark & Share Embed

Share this knowledge with your friends!

Copy & Paste this embed code into your website’s HTML

Please ensure that your website editor is in text mode when you paste the code.
(In Wordpress, the mode button is on the top right corner.)
  ×
  • - Allow users to view the embedded video in full-size.
Since this lesson is not free, only the preview will appear on your website.
  • Discussion

  • Download Lecture Slides

  • Table of Contents

  • Transcription

  • Related Services

Lecture Comments (6)

0 answers

Post by Muhammad ISHAQUE on August 2, 2016

He is a good

0 answers

Post by Tarik Eltaeib on September 15, 2013

yes, he is good Lecturer

0 answers

Post by Tarik Eltaeib on September 15, 2013

yes, he is good Lecturer

0 answers

Post by petar vukasinovic on September 27, 2012

You have realy good lectures i come here to learn php with Matthew but when i saw your videos it gives me new meaning of HTML
Thank you :)

1 answer

Last reply by: Jorge Guerrero
Sat Mar 17, 2012 9:50 PM

Post by Jorge Guerrero on March 17, 2012

What's TLD?

Links

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

  • Intro 0:00
  • URIs and URLs 0:23
    • Definitions of URL and URI
    • Differences Between URL and URI
    • Example: URI and URL
  • Typical URI Construction 2:33
    • Domain and Subdomain
    • Protocol
    • IP Address
  • Typical URI Construction 5:32
    • Second Level Domain
    • Port
    • Foldernames
  • Typical URI Construction 8:06
    • Filename and File Extension
  • Typical URI Construction 10:38
    • Name/ Value Pairs
    • Internal Anchors
  • Typical URI Construction 12:30
    • Example: URI Construction
  • Relative and Absolute URIs 14:20
    • Relative and Absolute URIs
    • Example: Relative and Absolute URIs
  • Link States 24:15
    • Link States
    • Example: Link States
  • Block Level Links 27:02
    • Example: Block Level Links
  • Bookmark Links 29:18
    • Bookmark Links
    • Example: Bookmark Links
  • Attributes 32:06
    • href and target
    • rel, media, hreflang, and type

Transcription: Links

Welcome back to Educator.com.0000

Today's lesson is going to go in-depth with links, also known as hyperlinks, anchor tags, hypertext...0003

It is basically the foundation of the Internet, so we are going to spend a lot of time looking at all the different details surrounding it.0016

The most important thing about links is probably that they take you to a location.0025

And when you specify in the link the location you want to go to, you are using a URL or a URI.0031

URL is Universe Resource Locator; URI is Universal Resource Indicator.0037

Now, there is a difference between these, even though most people use them interchangeably.0043

Most people just say URL all the time, but technically, a URL specifies the location of a resource on the Internet0049

and the way for retrieving it, whereas the URI can do that, or it can just specify the name.0057

It could just indicate what the resource is, without actually explaining to the browser how to get there or what the location is.0066

An example would be this link here: this is an actual URL from the w3 website.0074

There is this file right here, w3c_home, which is an image.0083

And this is a URI, not a URL, because it doesn't actually indicate the file type of this file.0089

It doesn't say it is a .gif or a .png; it just gives this file.0095

And it leaves it up to the browser and the server to negotiate together which file to get,0101

because there are actually two files on the server with this name in this location.0108

And there is something called content negotiation that the browser and the server talk to each other,0113

and say, the browser says, "Well, I can't read PNG, so will you please give me the GIF?" and the server will send the GIF.0122

Or it could be the other way around; and that is one of the advantages of using a URI, instead of a URL.0129

But this is just an example; there are a lot of different ways you can put the URI together.0135

But that is just a sort of preliminary introduction.0141

We are going to spend a lot of time looking at the URI, or the URL, and seeing what the different parts that make it up are.0145

Typically, a URL or URI--the most important part is the domain.0155

So, in this example, google.com, a very familiar ".com," is the top-level domain.0161

There are a lot of these: .com, .org, .net, .edu--which can indicate the type of website, or even the country of origin0168

(like .uk would be a Great Britain website).0177

And then, the next one behind that is the actual domain, and then in front of that is the sub-domain.0183

The domain is the main thing that you are usually thinking about when you are getting it.0192

And the sub-domain can be sort of like an entire website on its own, that is a part of the domain, but on its own little area.0197

It used to be that servers, way back in the day, when the Internet was not really the World Wide Web yet--0207

servers would have lots of stuff on them.0214

And Tim Berners-Lee invented the World Wide Web: he was hoping that people would put all their web pages in that www. domain.0218

So, that is why you see, a lot of times, www.domainname.com--because it is indicating that this is the World Wide Web part of the domain.0227

And nowadays, the World Wide Web is the most important part of the Internet, so we don't really do that anymore.0238

Now, kind of like subdomains, you just assume that they are going to be on the World Wide Web.0245

And you use it to divide it up.0250

So, for example, in maps.google.com, it is the maps website on Google, to distinguish it from other parts of Google.0251

This first part here, http, is the protocol: the protocol is the language that the browser and the server are using to communicate all of this data.0259

HTTP stands for Hypertext Transfer Protocol--hypertext, like HTML-type text markup language.0270

There are a couple of other ones; another one you may run into is FTP, which is File Transfer Protocol,0278

which you will use for uploading your web pages to a server.0283

And so, you need to specify how they are going to actually be talking.0288

So, this just establishes the language; this establishes the type of website;0291

the domain itself, where the server is--only now, it could be many servers; and the subdomain.0296

Now, I have also given an example of an IP address here.0306

You don't always have to use the domain; you can just use the IP address.0309

Every server has one; every domain has one; these aren't necessarily going to always be the same.0314

This is the IP address for Google right now; you may type it in later, and it might not work anymore; they may have changed it.0320

But they each have their own uses; usually, you just stick to the domain.0327

OK, so now, let's look at a second-level domain, which I already mentioned (.uk would a Great Britain website).0334

Actually, all .uk domains have a second-level domain, which is this part right here.0342

And it is probably the most common one, co: .co.uk.0349

You can kind of think of it as its own domain, but the real domain is here; and that has a second-level domain.0353

And this is just all one thing, and then you have the real domain--in this case, example is the name of the domain.0359

And then, sometimes, websites will need to specify a certain port that they are using.0367

That is this part right here: you have a colon after the top-level domain, right before the slash, and then you have the port number right here.0372

The default is going to be 80; so, if you put this port number, 80, in, it is almost always just going to not affect your URL.0379

It will just work automatically, because that is what the default is.0387

Usually, you are only going to put a port in if the server has something special where it needs a different port,0390

or if you have a certain reason that you are using a different port.0396

But just so...if you ever come across this, so you know what that is...0402

And then, probably the most obvious thing is folder names (in this example, educator.com).0407

In fact, if you look at the top of the browser right now, if you are viewing this online, you will probably see this Computer Science folder in the URL.0414

And there can be any number of folders; and these are very much like a folder on your computer.0422

It is a folder with files in it, that can contain other folders.0426

And you can navigate through them, just like any other folder.0430

You have the slash after the top-level domain, and then right after that will be a folder.0435

You know it is a folder, because it has this trailing slash.0443

It is important to put this slash here at the end, so that when you send the request for this page,0446

the server know that you are asking for a folder, and not a file.0453

If it doesn't have the slash, it is going to check to see if there is a file like this.0457

Remember what I was talking about--content negotiation: there may be some content negotiation stuff to go on there.0460

It is going to realize that there isn't, because nobody really does that anymore (unless you have very complicated reasons, or you are really advanced).0468

And then, it is going to send a second request with the slash on it.0477

So, it is just that if you don't put the slash, it is going to send two requests; and in some rare cases, you could cause some confusion.0479

The file name is usually going to be the very last part of the URL.0488

And it is just like a file on your computer, usually: it is the name of the file, and then the extension of the file.0492

For a lot of web pages--especially if you are hand-coding it--it is going to be .html.0500

Now, as I already mentioned, the extension is not always going to be there.0507

But it is a good idea to have one, if you are coding yourself, because you are going to have it0513

automatically associated with your text within programs and things like that.0521

On the Internet, that doesn't so much matter, especially if you have programs that are generating pages with server-side scripts or content management programs.0525

In this case, I have given the file index.html; and you can actually go to google.com/index.html, although you never do that.0538

And the reason is: well, 1) nobody wants to type .index.html every time they go to Google.0547

So, we have this shortcut system, where if you just have the domain, or you just go to a folder,0553

it automatically will look for some default files that are the index for that directory.0561

In this case, index.html is the default; you also will see things like name.html or .htm.0567

It depends on the server settings, but usually it will go automatically to index.html and name.html.0576

If we didn't put this in here, it would automatically get there.0583

We could put any other file name to get to one that is not the default.0587

This example right here is actually the same example as on the first slide, where I was talking about content negotiation.0591

But I have actually given the file extension, so this is no longer a URI; this is a URL.0601

It is actually giving the full location, and there is no content negotiation going on; it is saying, "Give me the GIF version of this image."0606

This example is another real-world example; you can go to this on the w3 website.0614

And you might think, based on looking at it, that this is a folder, because it doesn't have an extension here.0620

But this is actually the name of a file, and if you go here, it will bring up a page.0627

Now, if you wanted to go to the directory, there would be a slash there.0633

You can also send some variables or data through the URL, which happens a lot with forms and...0641

for example, on Google Maps, you will see a lot of variables sent.0650

Any website that is using server-side scripting in generating pages0653

and sending a lot of information around will have this sort of stuff show up in the URL.0656

It is called name/value pairs, and it is a variable with this name, and then this value.0663

So, it goes right after the file or end of the folder.0670

You put a question mark to indicate that you are starting with name/value pairs.0673

And then, you give the name, an equal sign, and a value; don't put any spaces or any really crazy characters.0678

And if you want to add more, you can use an ampersand and add as many more as you want.0684

And for HTML, the purpose of this course, I am not going to explain how you can really work with these.0689

It is usually going to be involved with scripting or form submission--server-side stuff.0696

But you will sometimes need to use this in your links.0700

The last thing that is a common part of URL construction is the internal link.0705

Right here, we have this hash at the end of this page here, and then a name that goes after it.0711

This is an internal link; so, what this link will do is take you to the Wikipedia article on HTML5.0719

This is the actual page that you are going to.0724

And then, right here, this hash indicates that it is a bookmark link that is going to take you to the section that is the markup section of that page.0728

So, you will actually scroll down to that part of the web page on this Wikipedia article.0736

And I will actually go into a little more detail on that later.0746

If you understood all that, you should be able to look at this URL and make some sense out of it.0752

I have taken away all of the real writing or names of domains, or anything like that, and just replaced it with the letter a.0759

Take a look at this and see if you can understand any of it.0767

For example, try and find the domain; try and find which parts are folders, which parts are name/value pairs...0770

And if you can, just go from left to right and identify every single part.0779

If you want to pause the video to do that, go ahead.0784

I'll go ahead and explain it from left to right, just to make sure you have it.0787

This part right here, before the colon and the double slash, is the protocol.0792

In most cases, on web pages, that is going to be HTTP: hypertext transfer protocol.0796

Then, we have this section right here, which is the domain, which consists of the top-level domain, the domain name itself, and then the subdomain.0801

This :80 is the port, and then the slash--if the :80 wasn't there, the slash would be directly after the top-level domain.0812

These two sections right here, just contained in the slashes, are folders.0821

And this is a file name; we can tell, because there is not a slash here.0826

And this dot indicates that this is probably the file extension, and this is the file name.0831

This question mark indicates that you are starting name/value pairs, so this is some stuff that some code is going to be using.0837

The ampersand indicates that it is starting another name/value pair.0843

So, this is the first variable, and this is the value to it; that is the second variable, and that is the value for it.0847

And this is a bookmark link, or an internal link.0851

This will scroll you down to the part of the page that has this name on it.0855

It is important to understand the difference between relative and absolute URL's, or URI's,0863

because a lot of times, you will be making copies of pages, or transferring them to new locations;0869

and if you have these messed up, then your links are all going to break--every single one.0877

Say you change the name of a folder, or you move it, or you make a copy...0882

So, it is important to get this straight.0887

An absolute URL is what I described in the first part of this lesson: it is things starting with the full URL,0890

with the protocol and the domain and all of that, all the way up.0897

Now, you can use shortcuts to define these links relatively.0901

So, in this example--all of these examples, by the way, are the full URL; that is why I have used these quotes--0907

to indicate that I am not truncating it for the sake of the slide here; this is the full thing.0914

You could have href= all of these, or source= ; this is the full thing.0920

In this case, you have a slash before index.html.0930

When you begin a URL with a slash, what that does is takes you to the root level of where you are.0935

Everything is relative to the document or the file that has the link in it.0942

If you are on Educator.com, for example (or any domain), it is going to take you to the root of that domain if you use this slash here.0948

It would take you...no matter how many directories deep you are, it is going to take you directly down to the domain name.0956

So, educator.com/index.html is where this would take you if you were on the Educator domain.0962

If you are on your computer, and you do this locally, it is going to take you to the root of your computer,0967

which, in, say, Windows, is probably going to be your C drive; so, it would be C:/index.html if you happen to have an index.html file there.0973

And if you don't have that slash--if you just have the file name itself with nothing else before or after it--0984

that is going to be, again, relative to the page that the link is on.0991

And it is just going to take you to index.html--that file in that folder that that file is in.0999

So, it is going to go relative from where it is; it is not going to change anywhere, and it is just going to look for a file of this name in the same folder, same directory.1006

Now, these examples are more on the same theme of: you can go to a root, and then go to a folder.1018

And then, this trailing slash here--you can remember that lets you know it is a folder.1027

So, what this will do is take you to the root of the domain or your computer, go in this folder, and then open the folder.1032

So, if you are on your computer, it will probably just open this folder up, and you will be seeing files.1038

If you are on a domain on the Internet, it will probably look for the index.html file in this folder and open that.1042

Or if it can't find it, it will show you a little funny display of the files in that folder.1050

Now, this is where it gets a little bit tricky.1058

This notation here--the two periods before the slash--doesn't take you to the root.1061

What it does is takes you up a directory; so, whatever directory you are in, it will look up one directory.1067

If you are in a folder called Folder, and that folder is in the root, it will take you to the root.1077

So, it could potentially take you to the root; but if you are several folders deep, it will only take you one folder up, not all the way to the root.1085

But then again, if you are several folders deep, you can go one at a time.1092

So, in this case, it would take you up one folder, two folders, three folders, four folders.1096

And then, it is going to start going down from four folders up from where your folder started from,1101

into the folder names that are here--one, two, three deep, depending on what these names are.1107

This may be a little bit confusing to just explain verbally, so I am going to try and give a little bit of examples here, looking locally on this hard drive.1113

Here, I have prepared a couple of folder structures.1130

This is mimicking a couple of cities and states in the United States.1135

Here is the top folder; we could imagine it is in the root, although it is not really.1142

And then, directly in this folder, we have California, Florida, and New York folders.1147

And in each one of these, there are cities; and then, each city has several HTML files that are for that city.1152

See, Florida has Orlando here; New York has Buffalo, Manhattan, Rochester; and those.1162

So, if we wanted to, say, open up this file here, we get this little page for the city of Rochester.1169

And this is page 4; we could click to city 1, and it would take us to city 1.1181

They actually look exactly the same, so you probably didn't notice that it changed, although,1186

if we were going to pull it up in the code, we can look at it and see what is really happening.1192

Here is the code for that same page we were just looking at.1211

And look at this links here: this is a list of links that we had, and I clicked on city 1 from the city 4 page.1214

And they were all in the same directory; and you will notice that the URL's here are just simply the name of the file.1223

So, since it is in the same folder, it just looked for city1.html in the same folder.1230

And it just moved on over, very simply.1236

Now, it could have very easily gone to another folder, if I had indicated in here, say, that I wanted to go up a folder.1240

This is in Rochester; and then, these two dots and then the slash--you can go up, so that will take it up into the New York folder.1254

And then, say I wanted to move over to Manhattan--I could then drill down from New York into the Manhattan.1263

And then, it would open the city1.html in Manhattan.1270

I have sort of messed up this page, if somebody was trying to really use it for something useful.1275

But now, if we refresh this and click on it, it is going to take us to Manhattan now,1279

Even though I didn't change the name of the file, because the Manhattan city file has the same name.1288

And so, you also can see that (let's go back to Rochester) I have links to the State and Nation pages.1298

So, say I click on the state; now, I have a page for New York, and it has links to these other ones here.1307

Here, we can see, in the directory up here: this is the New York directory, and we have this index.html.1313

Let's open that with our text editor; and now you can see the code here.1322

And these links are drilling down from the state level into the city level.1330

So, they all precede the file name with the name of the folder of the city that they are going into1336

(Manhattan for these, Buffalo and Rochester on through...), and you can see easily that they will click right on through,1342

to the city, like this, and then up to the nation, as well.1356

Let's say that you want to do something funny.1359

You are in California, in the Los Angeles link, and you want to make a link that drills up to the state,1363

and then up to the nation, and then back down into Florida, and then down into Orlando, and then opens one of the files there.1374

And you don't want to give the full path to it in an absolute way.1383

You just want to give it in a relative way.1386

Let's show you how to do that.1390

We are in California, LA, and then this first one here; let's edit it...all right, there it is.1392

Let's create this link: first, go up one directory; and that will be, not in the city level, but in the state level;1409

up again, and that takes us into the country level; and then we want to go down into Florida, and then down again into Orlando.1417

And then this slash to separate them...and save that...1428

And then, refresh it here, and this should take us to Orlando.1438

It went up, and then back down.1443

All right, so links can actually appear in several different types of states.1449

You probably already know this without really thinking about it, because it is a default browser style in all browsers,1461

where links that you have already visited once are a different color; if you haven't visited them yet, they are usually blue.1469

And then sometimes, while you are clicking on it (or while you are hovering over it), it can change.1475

This is done with CSS; it can actually also be done with HTML, but that is HTML4.01, and I want to focus more on moving forward and using HTML5.1479

So, I am not going to explain how to do it with HTML; I am just going to recommend that you use CSS.1489

This is the CSS that you would use to change the different link states to the styling that you want.1494

If it is just this one here, link is the unvisited link; give it a color blue...1504

text-decoration means to remove the underline for it; that is kind of the cool thing that people like to do.1509

visited will give it a red color, and then hovering and active--I am going to underline it.1514

If we open up this United States page, this top one, you will see that the text is green.1519

And then, say, I click on this and then go back; it is still green.1529

But if we want to open it up in the code and look at what it is going to look like, we can change the colors whichever way we want.1535

Here is the main index; OK, there it is.1549

And I have hidden, all the way down at the bottom here, some styles: a:visited{color:red;},1560

and then the text-decoration while you are hovering is to be underlined,1572

and then if it is active, it is going to be underlined and have a font weight of bold; we'll save that.1576

So now, you notice, if I click on it, it turns bold for a second; and when I let go, it doesn't go there; the same thing here.1592

And the underline shows up as I hover over it.1600

Now, see here, this is the default; the color is not changing--there must be some browser setting that I am not aware of.1606

But in most browsers, it will actually work the way that I expected.1613

Block level links are a new thing in HTML5, although browsers have been doing it this way for a long time.1623

Technically, in HTML4.01, you are not allowed to have block level elements within an anchor tag (or an anchor element, I should say).1631

You should just have text, or text-level elements, like em or span or things that change the text on a textual level,1641

instead of like blocks and boxes and headings and images and things.1653

But browsers have been supporting you doing this (against the specifications), and in HTML5, they decided that it should be allowed.1658

So, this is a new thing that you can do, and be semantically correct and conforming, as well.1665

Say that you have a web page here, and you have a little advertisement that you have off to the side.1671

And this advertisement is going to have a header, an image, and then a little title below it1679

to try and get you to click on it and "go and get your free iPod" or whatever.1686

You would have a little aside; and it used to be that, to be conforming, you would have to have this same link, href,1691

to spam.com or whatever you are going to, for each one of these.1698

So, you would have to have one in here, one here, and then one here, as well.1703

But now, you can include all three of them in this one link.1707

And you notice that that changes some things.1712

It frees up the Alt tag in this image; now, instead of describing where the link is going, I can just describe the image,1714

because this isn't the only thing that is in the link.1722

So, whereas before I would have to say something like, "Link to free iPod," now it can describe the image.1726

And this is an image of a very free-looking iPod.1733

You can do lots of block elements; you can do lists--you can have entire lists inside of an anchor tag.1741

Any time that you want to have multiple things linking to the same thing, you can do this now.1751

Bookmark links are what I described before, when you are going to have the browser automatically scrolling down to a certain location on the page.1760

The way to do that, as I indicated before, through URL's, is with this hash mark.1768

This is going to be a relative URL, so it is going to be looking at the very page that it is on.1773

Whatever page this link is on, it is going to go to that page, relative to that page, and then look for this internal location on that page.1778

And then, it is going to scroll through the page until it finds that this down here is the destination of this link.1789

And you just indicate it with an ID, so it has the same name.1796

You don't need to put the hash here; that is just a special notation to indicate in a link that it is looking for an internal link.1799

And then, this is just the name itself.1806

It used to be that you would have to have another anchor tag--something like a:name= and then the name of the bookmark link.1807

But now, any idea will work.1814

Let's pull open our page that we have here and give an example.1816

Let's say we want to make an easy way to link to the bottom of this page.1824

We can say, "Link to the end," and we are going to have the end right here, and put the hash1831

(and that is the bookmark notation), and then the content of the link, and then end it.1845

OK, so we have that paragraph; and now, let's go down to the bottom and create the destination for it.1855

We can put it right in this paragraph tag.1868

Save that; pull it up in the browser now; all right...there is the Nation page.1881

So, here is this new little text that we added to the end of this page, and it is a link.1894

And a link, again, is going to look just like this in the source.1899

And when you get to it, click on it; it pops us down to the bottom of the page.1911

This is the end; that is the text we added there.1916

And this is the exact same page; it just popped us down.1918

OK, the last slide is just kind of a quick overview of attributes.1928

There are a lot of attributes that you can use in links, but these are the most important ones.1933

The href and target attributes deal with what happens when users follow the link; so they are action attributes.1941

href, you should know by now, is hyper reference; it is going to tell where the link is going.1950

And then, the target is going to say how it is going to do that, or what context that page should be opened in.1956

Here is an example here: href popped an HTML.1963

It has a target attribute, and the value here is _blank, which is a special value that will open this link in a new window,1966

which I advise to never do, unless you have seriously thought through it,1978

because it is annoying for people who know what they are doing,1982

and it is confusing for people that don't know what they are doing, on the Internet.1985

But nonetheless, you can do it; but there are a lot of other types of contexts in which you can have a new page be opened.1988

The rel, media, href lang, and type attributes are all attributes that give information about the target link and describe its nature.1999

In this first example, it is a little gift that is being linked to the type attribute.2012

Well, this can describe what the MIME type is; so it is an image/gif.2018

And so, normally, when you link to an image like this, it is just going to open it in the browser.2024

But depending on your browser settings, if you specify a type of image/gif, it may decide to download the image,2030

because it is an image, instead of just another part of the Internet (like a page).2039

And so, this can be a very important attribute.2046

The rel attribute will describe the relationship of the page that you are linking to, to the page that it is being linked from.2051

So, in this example here, you have a link to page 2; you can imagine you are on page 1.2061

And the relationship between page 1 and page 2 is that page 2 is the next page from page 1.2067

And this is also a specified value; I didn't just make it up.2074

And so, browsers can look at this and understand where the flow is going and this sort of thing.2079

It is useful for browsers and a lot of other contexts.2086

We already looked at the pop-up example; this example here is the relationship one again.2092

That is just a duplicate, so ignore that.2098

Now, this last one is probably the most complicated, and probably going to be used the least.2101

But it indicates a relationship of alternate, which means that the page that it is linking to is an alternate version of the same page.2107

So, this link, you could imagine, would be, say, a page in French, and it is linking to an English version of that page.2117

And furthermore, it is specifying, with the media tag, that the type of media that it is--it is to be printed.2125

It is going to link to the English version of the page, and then print it for you immediately.2134

And the href lang is just specifying a language (en for English, of course).2140

And then, this is some French; I think this says "Print in English."2145

But for the most part, you can get away with just using the href attribute,2150

and then any other attributes that are global attributes,2157

that you can use anywhere else, that you need to use, depending on your context.2160

And then, these other ones are just good to know about, in case a situation comes up where you need them.2164

You should have a good introduction to links and the different situations and contexts that you might use them.2170

There is always more research that you can do on your own when you come across2178

more particular use cases are scenarios that you need to research on your own.2182

Just pull up a browser and do a Google search, or look at the HTML5 spec.2187

But this should be a good introduction, so far, for links.2193

And thanks for watching Educator.com.2198

Educator®

Please sign in to participate in this lecture discussion.

Resetting Your Password?
OR

Start Learning Now

Our free lessons will get you started (Adobe Flash® required).
Get immediate access to our entire library.

Membership Overview

  • Available 24/7. Unlimited Access to Our Entire Library.
  • Search and jump to exactly what you want to learn.
  • *Ask questions and get answers from the community and our teachers!
  • Practice questions with step-by-step solutions.
  • Download lecture slides for taking notes.
  • Track your course viewing progress.
  • Accessible anytime, anywhere with our Android and iOS apps.