© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Slides:



Advertisements
Similar presentations
Absolute vs. Relative Paths/Links
Advertisements

File References, Trees, and Computational Thinking Craig Miller School of Computing DePaul University.
Announcement #1 1 Lecture 9. Announcement #2  Midterm exam will be on Oct. 12 (Tuesday)  pm – 1.45 pm  Exam will cover all materials till Oct.
Chapter 14 Introduction to HTML
IPUB 100 Lesson 2 Instructor Mark Lamontagne Homework Review.
Hyperlinks. Linking pages…Hyperlinks 2 Lecture 8  Hyperlink “A clickable HTML element that will direct the web browser to display a different Web page.
Enhancing Your Web Site—Adding Links Web Page **YOU MUST HAVE COMPLETED THE 1ST 3 WEB PAGES BEFORE YOU CAN DO THIS ONE. **YOU SHOULD HAVE COMPLETED THE.
UNIT 2 UNIT 2 Module 3: HTML Lists Overview. List There are two common types of HTML lists Ordered list numbered Unordered list bullet points.
ET710 HTML Paths: Dot Dot Slash Notation. Directory (folder) Hierarchy. We can think of a computer’s file structure as a tree with branches. The trunk.
Internal and External Links Web Design – Section 3-6 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
CSCI N241: Fundamentals of Web Development Copyright ©2006  Department of Computer & Information Science Navigation, Links & Images.
To be completed Your proposal  Your House style  Your site plan  Page plans (a draft layout for each of your five pages)  A design mock-up -  All.
3.02E Website File Management 3.02 Develop webpages.
1 More About HTML Images and Links. 22 Objectives You will be able to Include images in your HTML page. Create links to other pages on your HTML page.
HTML Links and navigation Basharat Mahmood, Department of Computer Science,CIIT,Islamabad, Pakistan. 1.
Lecture 8 Introduction to Web Programming. Announcement  First In-class exam will be on Oct. 10 (Wednesday)  2.50pm – 4.05pm  Exam will cover all materials.
Hyperlinks Links for Other Pages. Hyperlink (aka Link) Text (or image) user can click Takes user to different location In general, location can be: On.
Making the website. Get your folders sorted first Create a new folder in “N” called “My hockey website” Create folders inside called “Documents”, “images”
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
HTML Links CS 1150 Spring 2017.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
4.01 How Web Pages Work.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
4.01 How Web Pages Work.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Chapter 8 Introduction to HTML
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Internal and External Links
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Pre-Coding Web Design – Sec 3-1
Learning the Basics – Lesson 1
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
E-commerce | WWW World Wide Web - Concepts
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
E-commerce | WWW World Wide Web - Concepts
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
How files are organized
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
HTML Introduction Lecture 8.
A01 DESIGN To be completed Your proposal  Your House style 
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Lesson 4 – Introduction to CSS
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Chapter 6 pp
Dreamweaver.
4.01 How Web Pages Work.
HTML Links CS 1150 Fall 2016.
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
Website File Management
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
Presentation transcript:

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. "Digital Media Primer" Yue-Ling Wong, Copyright (c)2016 by Pearson Education, Inc. All rights reserved. © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Chapter 8 Introduction to HTML Part 5 File Paths © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

In this lecture, you will learn: Types of file paths How to construct a document-relative file path for writing HTML documents © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. File Path Location of a file on a computer Like an address to a house Start with the outermost folder to the inner folders Folder names are separated by a slash (/) © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Types of File Paths for Web Documents Absolute paths Document-relative paths Site root-relative paths © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. Absolute Paths Example: http://www.mysite.com/products/coffee/french-roast.html Full URL to a Web page or any media Used for linking to files that are on a different Web site © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Document-Relative Paths Example: products/coffee/french-roast.html Most commonly used in Web authoring The path is relative to the page that french-roast.html is being requested © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Site Root-Relative Paths Example: /products/coffee/french-roast.html Starts with a slash (/), meaning starting from the root folder of the site A root folder is the outermost folder of the site © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Example Folder Structure of a Site Root folder Root folder © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. Navigating Folders © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Opening the "products" folder © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Opening the "coffee" folder that is inside "products" © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Now from the "coffee" folder let's navigate back up © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Going Up One Level to "products" © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Going Up One More Level to "my-site" © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

To Construct a Document-Relative Path Need to know: Target page: The page being linked to Source page: The page containing the link or the page being linked from Think of the document-relative path as the direction to navigate from the source page to the target page. © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

To Construct a Document-Relative Path Rule #1: To link to another file that is in the same folder as the current document, simply use the filename as the path. © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

To Construct a Document-Relative Path Example: To add a link in mocha-java.html (source page) to link to french-roast.html (target page), the file path is simply the filename french-roast.html © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

To Construct a Document-Relative Path Rule #2: To link to a file (target page) that is in a subfolder of the current document’s (source page's) folder, use the subfolder name followed by a forward slash (/) and then the filename. Each forward slash (/) represents moving down one level in the folder. © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

To Construct a Document-Relative Path Example: To add a link in index.html (in my-site folder) to link to french-roast.html (target page), the relative path is: products/coffee/french-roast.html © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

To Construct a Document-Relative Path Rule #3: To link to a file that is outside of the current document’s folder, start the path with ../ followed by the folder name, a forward slash (/), and then the filename. Multiple ../ can be appended for going up multiple levels in the folder hierarchy ../ means going up one level in the folder hierarchy © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

To Construct a Document-Relative Path Example: To add a link in french-roast.html (source page) to link to index.html (in my-site folder), the relative path is: ../../index.html © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. Review Questions Note to instructor: Depending on your preference, you may want to go over the review questions at the end of this lecture as an instant review or at the beginning of next lecture to refresh students' memory of this lecture. © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. Review Question For the site example shown here, to add a link on the page french-roast.html (source page) to link to the Web page mocha-java.html (target page), the document-relative file path is ___ . mocha-java.html © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. Review Question For the site example shown here, to embed the image logo.png (target page) on the homepage index.html (in the my-site folder), the document-relative file path is ___ . images/logo.jpg © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. Review Question For the site example shown here, to embed the image logo.png (target page) on the Web page french-roast.html, the document-relative file path is ___ . ../../images/logo.jpg © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.