Site Organization.

Slides:



Advertisements
Similar presentations
Absolute vs. Relative Paths/Links
Advertisements

Understanding HTML Style Sheets. What is a style?  A style is a rule that defines the appearance and position of text and graphics. It may define the.
IPUB 100 Lesson 2 Instructor Mark Lamontagne Homework Review.
Eat Your Words! Creating webpage Layout. CONTENT The Layout of a Webpage HEADER FOOTER Each of these sections represents a ‘div’ (or divider). By linking.
XP Dreamweaver 8.0 Tutorial 3 1 Adding Text and Formatting Text with CSS Styles.
CM143Web Week 8 Review of Assignment 1 Revision & Elaboration.
 cascade Style Sheets (CSS) is a mark-up language that was first proposed in 1994 by Håkon Wium Lie. CSS works in conjunction with HTML to greatly increase.
IS1825: Developing Multimedia Applications for Business Lecture 1: Introduction to CSS Rob Gleasure
How to upload files to Altervista Overview:
FUNDAMENTALS OF HTML, XHTML & CSS Lesson 4. THE OBJECTIVES -  In this lesson you will begin coding in HTML to provide the structure  You will learn.
Tutorial 3 Adding and Formatting Text with CSS Styles.
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.
Site Organization. The Need to Organize Site Files Thus far, we have placed all our site files into the main (root) website folder. As a website becomes.
`. Lecture Overview HTML Body Elements Linking techniques HyperText references Linking images Linking to locations on a page Linking to a fragment on.
CSS IS A LANGUAGE DESIGNED TO TARGET HTML ELEMENTS AND NODES BY TYPE, CLASS, ID AND VALUE, AND CHANGE THEIR VALUES CSS – change how your HTML looks and.
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.
Finally getting to html and CSS… Tim Berners-Lee, the writer of the software program that makes him the inventor of the WWW, defines the Internet as a.
HTML Links CS 1150 Spring 2017.
4.01 How Web Pages Work.
CSS Cascading Style Sheets
Web Basics: HTML/CSS/JavaScript What are they?
HTML Basics.
4.01 How Web Pages Work.
Dreamweaver – Setting up a Site and Page Layouts
HTML5 Basics.
Objective % Select and utilize tools to design and develop websites.
Section 4.1 Section 4.2 Format HTML tags Identify HTML guidelines
Introduction to CSS.
Internal and External Links
Cascading Style Sheets
Fundamentals of HTML, XHTML & CSS
Bare bones notes.
XHTML Basics.
Internal and External Links
Using Cascading Style Sheets Module B: CSS Structure
Creating Tables in a Web Site Using an External Style Sheet
Objective % Select and utilize tools to design and develop websites.
Relative Paths.
Filezilla problems continuing
Introduction to CSS.
CSS.
XHTML Basics.
XHTML Basics.
Site Organization.
How files are organized
5.2.3 Be able to use HTML and CSS to construct web pages
HTML Tags and References to other Files
HTML Introduction Lecture 8.
Starting to develop a website
Working with Cascading Style Sheets (CSS)
Web Page Validation File management and Referencing
Working with Cascading Style Sheets (CSS)
Some Stuff You Need to Know
XHTML Basics.
CSS.
Introduction to CSS.
Understand basic HTML and CSS terminology, concepts, and basic operations. Objective 3.01.
Computer communications
Please bookmark your URL
HTML & CSS 7 Languages in 7 Days.
XHTML Basics.
Cascading Style Sheets
Lesson 2: HTML5 Coding.
Digging in a little deeper
4.01 How Web Pages Work.
HTML Links CS 1150 Fall 2016.
HTML Tags and References to other Files
One Set of Styles Connected to As Many Pages as You Want!!!
© 2017, Mike Murach & Associates, Inc.
Presentation transcript:

Site Organization

The Need to Organize Site Files Thus far, we have placed all our site files into the main (root) website folder. As a website becomes larger and more sophisticated, a single folder becomes too cluttered to manage effectively. To better organize our site, we can group similar files, such as images and CSS files, into their own dedicated subfolders.

Relative Paths Once we move site files to subfolders, we need a way to tell the browser where to find them. To do this, we use relative paths: <div class="gallery"> <img src="images/flowers.jpg" /> <img src="images/orange.jpg" /> <img src="images/pink.jpg" /> </div> The path is always relative to the file making the reference. In this case, the path is relative to the location of index.html. Always use the forward slash (/) in file paths, never the backslash (\).

Absolute Paths A common mistake committed by novice web designers is to copy and paste the full path to a local file in their markup: <div class="gallery"> <img src="images/flowers.jpg" /> <img src="images/orange.jpg" /> <img src="file:///C:/Users/me/Desktop/Website/images/pink.jpg" /> </div> This can be a frustrating error, as the browser on our own computer can locate and display the image. But when the site is uploaded to a live web server, the image won't appear, since the location is no longer valid. These paths, since they are not relative to the current location, are known as absolute paths.

External CSS Style Sheets Our earlier example of an external CSS style sheet assumed the actual CSS file was in the same directory as the XHTML file. Now that we are better organizing our site, we should move the CSS file to its own folder: <head> ... <link rel="stylesheet" type="text/css" href="css/mycss.css" /> </head> Complex websites can have dozens of style sheet files in the CSS folder.

Relative Paths in Style Sheets As we know, CSS style sheets can set background images for elements. Now that the style sheet is in its own folder, we need a way to point the CSS file to an image that is located up one folder level and then down into a different subfolder: body { background-image: url('../images/orange.jpg'); } This is the mycss.css file. Remember, the path is always relative to the file making the reference. In this case, that file is the CSS file in its own subfolder. The two periods and forward slash instruct the browser to "go up one folder level".