HTML Introduction Lecture 8.

Slides:



Advertisements
Similar presentations
XP 1 Developing a Basic Web Site Tutorial 2: Web Site Structures & Links.
Advertisements

Developing a Web Site: Links Using a link is a quicker way to access information at the bottom of a Web page than scrolling down A user can select a link.
New Perspectives on Creating Web Pages with HTML
HTML Introduction (cont.) 10/01/ Lecture 8, MAT 279, Fall 2009.
XP Adding Hypertext Links to a Web Page. XP Objectives Create hypertext links between elements within a Web page Create hypertext links between Web pages.
HTML Introduction. What we have learned so far:  2.1 Basic HTML page development  2.2 Tags… (example?)  2.3 Lists… (example?)  2.4 Single Tag… (example?)
Introduction to Web Site Development Steven Emory Department of Computer Science California State University, Los Angeles Lecture 3: Hyperlinks and Images.
Tutorial 2 Developing a Basic Web Site
Web Structure Create Links Using HTML. 2 Objectives List different types of Web site structures and how to employ them Create element ids to mark specific.
Chapter 2: Application layer  2.1 Web, HTTP and HTML (We will continue…)  2.2 FTP  2.3 SMTP 9/22/2009 Lecture 7, MAT 279, Fall
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.
XP 1 Developing a Basic Web Site Creating a Chemistry Web Site Tutorial 2.
XP Tutorial 2New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Developing a Basic Web Site Creating a Chemistry Web Site Tutorial 2.
Tutorial 2 Developing a Web Site
CNIT 132 – Week 3 HTML (2). Working with Links Using a link is a quicker way to access information at the bottom of a Web page than scrolling down. A.
Tutorial 2 Developing a Basic Web Site. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Learn how to storyboard various.
4 HTML Basics Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and.
Hyperlinks. Linking pages…Hyperlinks 2 Lecture 8  Hyperlink “A clickable HTML element that will direct the web browser to display a different Web page.
XP 1 New Perspectives on Creating Web Pages with HTML Adding Hypertext Links to a Web Page.
Images (1) Three most popular formats – Graphics Interchange Format (GIF) – Joint Photographic Experts Group (JPEG) – Portable Network Graphics (PNG) –
Images in HTML PowerPoint How images are used in HTML.
XHTML Louise Soe updated September 2009.
Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and attributes Create.
Programming in HTML.  Programming Language  Used to design/create web pages  Hyper Text Markup Language  Markup Language  Series of Markup tags 
Developing a Web Site. Web Site Navigational Structures A storyboard is a diagram of a Web site’s structure, showing all the pages in the site and indicating.
Tutorial 2 Developing a Basic Web Site. XP Objectives Learn how to storyboard various Web site structures Create links among documents in a Web site Understand.
HTML, CSS, and XML Tutorial 2 Developing a Web Site.
XP Mohammad Moizuddin Creating Web Pages with HTML Tutorial 2 1 New Perspectives on Creating Web Pages With HTML Tutorial 2: Adding Hypertext Links to.
1.  Use the anchor element to link from page to page  Configure absolute, relative, and hyperlinks  Configure relative hyperlinks to web pages.
Tutorial 2 Developing a Basic Web Site. XP Objectives Learn how to storyboard various Web site structures Create links among documents in a Web site Understand.
1 John Magee 9 November 2012 CS120 Lecture 17: The World Wide Web and HTML Web Publishing.
XHTML1 Images N100 Building a Simple Web Page. XHTML2 The Element The src attribute specifies the filename of an image file To include the src attribute.
Developing a Basic Web Site
XP 1 Developing a Basic Web Site Creating a Chemistry Web Site Tutorial 2.
Creating Links. The Anchor Element: The anchor tag can be used in three different ways: 1.External link – to link to a web page outside your own website.
Tutorial 2 Developing a Web Site. XP Objectives Learn how to storyboard various Web site structures Create links among documents in a Web site Understand.
XP 1 HTML Tutorial 2: Developing a Basic Web Site.
4 HTML Basics Section 4.1 Format HTML tags Identify HTML guidelines Section 4.2 Organize Web site files and folder Use a text editor Use HTML tags and.
XP INFT 140 – Chapter 2 1 Developing a Basic Web Site Creating a Chemistry Web Site.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
Developing a Basic Web Site HTML Tutorial 2. Objectives Define links and how to use them. Create element ids to mark specific locations within a document.
REEM ALMOTIRI Information Technology Department Majmaah University.
XP 1 Charles Edeki AIU Live Chat for Unit 2 ITC0381.
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.
Lecture 6, MAT 279, Fall HTML Introduction (cont.) 9/17/2009.
TNPW1 Ing. Jiří Štěpánek.  Tags  Marks for elements ▪ Pair ▪ Start and end tag ( Paragraph text ) ▪ Single ▪ Only start tag, according to XHTML 1.0.
HTML5 and CSS3 Illustrated Unit E: Inserting and Working with Links.
HTML Links CS 1150 Spring 2017.
Introduction to HTML.
HTML Basics.
HTML basics
Section 4.1 Section 4.2 Format HTML tags Identify HTML guidelines
Images in HTML PowerPoint How images are used in HTML
Developing a Basic Web Site
Hosted by Coach Slanina
LINKS.
HTML Images CS 1150 Spring 2017.
Graphics (Characteristics 1)
Inserting and Working with Links
CNIT 131 HTML5 – Anchor/Link.
Basic HTML and Embed Codes
HTML Images CS 1150 Fall 2016.
Pertemuan 1b
Adding Images.
Pertemuan 1 Desain web Pertemuan 1
Hyperlinks, Images, Comments, and More…
Adding Images.
HTML Links CS 1150 Fall 2016.
Images in HTML PowerPoint How images are used in HTML
Presentation transcript:

HTML Introduction Lecture 8

What we have learned so far: 2.1 Basic HTML page development 2.2 Tags… (example?) 2.3 Lists… (example?) 2.4 Attributes… (example?) 2.5 Single Tag… (example?) So far, we have learned text handling. How about Image? Image handling in HTML Lecture 8 Lecture 8

Image tag <IMG> tag: place images on Web Pages src attribute: specifies name of image file attribute_name: src attribute_value: source file name alt attribute, give your image a hidden name attribute_value: a hidden name of your image example: <IMG src=“dave_logo.jpg” alt=“Dave’s logo”> Lecture 8

<IMG src=“logo.jpg” width=“100” height=“200” alt=“Dave’s logo”> Image tag (contd.) Specify size of image file to be displayed attribute_name: width, height attribute_value: define the width or the height of image example: <IMG src=“logo.jpg” width=“100” height=“200” alt=“Dave’s logo”> Lecture 8

Image tag (contd.) place an image in center of a browser Use <CENTER>, … </CENTER> tag example <CENTER> <IMG src=“logo.jpg” width=“100” height=“200” alt=“Dave’s logo”> </CENTER> Alternatively, <h1 style=“text-align:center”> <IMG src=“logo.jpg” width=“100” height=“200” alt=“Dave’s logo”> </h1> Lecture 8

Remember: Use image files in .gif, .jpg, .png format Do NOT use .bmp, .tiff, .pict Use images with small size Lecture 8

NOTE When inserting an image, make sure that the image file is located at the same disk directory as shown in your src attribute in <IMG> tag Example if <IMG src=“logo.jpg” …> is used in your html file, then the image file (logo.jpg) MUST be installed in the same disk and same file folder with your html file! Lecture 8

Next Level: Developing a Web Site Lecture 8

Web Site Structures A well-designed structure ensures users navigate the site with ease not get lost not miss important information Lecture 8

Web Site Structures Storyboard is a diagram of a Web site’s structure shows all pages in a site indicates how the pages are linked together defines a structure that works best for the type of information of the site Very important for the websites projects! Lecture 8

Different types of Website Structures Lecture 8

(1) Linear Structures each page is linked with the page follows and the page precedes it in a chain works best for Web pages with a clearly defined order commonly, each page contains an additional link back to an opening page Lecture 8

Linear Structures Lecture 8

Advantages & Disadvantages? Lecture 8

(2) Hierarchical Structures pages are linked going from the home page down to more specific pages users easily move from general to specific and back a user can move quickly to a specific page without moving through each page in order Lecture 8

Hierarchical Structures Lecture 8

Advantages & Disadvantages? Lecture 8

(3) Mixed Structures hierarchical allows the user to move from general to specific linear allows users to move through the site in a linear fashion How about mixing the both??? Lecture 8

Mixed Structures Lecture 8

(4) Protected Structures Lecture 8

Linking pages…Hyperlinks “A clickable HTML element that will direct the web browser to display a different Web page or a different location on the current Web page.” Lecture 8

Hyperlinks Use tags <a>…</a>, and href attribute example href = “a link destination” example <a href = “tutorial.html”> Tutorial </a> link destination link label, visible on a Web page, where you will click Lecture 8

Specifying a Folder Path Lecture 8

Specifying a Folder Path To create a link to a file located in a different folder than the current document, you must specify the file’s location, or path An absolute path specifies a file’s precise location within a computer’s entire folder structure A relative path specifies a file’s location in relation to the location of the current document If the file is in the same location as the current document, you do not have to specify the folder name If the file is in a subfolder of the current document, you have to include the name of the subfolder Lecture 8

Specifying a Folder Path If you want to go one level up the folder tree, you start the relative path with a double period (..), a forward slash, and then provide the name of the file To specify a different folder on the same level, known as a sibling folder, you move up the folder tree using the double period (..) and then down the tree using the name of the sibling folder Lecture 8

Hyperlinks Three type of Hyperlinks Relative URL Absolute URL Name id links to a Web page on the same Web server only need relative directory for the linked file Absolute URL links to a Web page on a different Web server a complete URL should be used e.g., http://jjcweb.jjay.cuny.edu/ssengupta/ Name id links to a different location on the same Web page links to a different location on the different Web page Lecture 8

Relative URL link destination <a href = “page2.html”> My Page 2 </a> link label, visible on a Web page, where you will click link destination <a href = “../page3.html”> My Page 3 </a> link label, visible on a Web page, where you will click Lecture 8

Absolute URL link destination <a href=“http://jjcweb.jjay.cuny.edu/ssengupta/”> Instructor’s website </a> link destination link label, visible on a Web page, where you will click Lecture 8

Hyperlink to a certain location id attribute assigns a name (or an ID) to an element with the ID, an element can be referred to easily syntax <tag id=“name”> content </tag> e.g., <h1 id=“welcome”> Welcome to MAT 279 </h1> Note: id names must be unique id names are NOT case sensitive Lecture 8

Creating hyperlinks to locations in same document use id attribute to identify the destination of the hyperlinks syntax <a href=“#id_name ”> content </a> e.g., <a href=“#welcome”> Go to the top of the page. </a> Lecture 8

Creating hyperlinks between documents use id attribute to identify the destination of the hyperlinks create a hyperlink specific location in another file with syntax <a href=“filename.html#id">content</a> filename is the file name of destination HTML file id is the id name of an element in the destination file e.g <a href=“tutorial.html#para2”>Go to the second paragraph of the tutorial </a> Lecture 8

Working with Hypertext Attribute (target) You can force a document to appear in a secondary window or tab by adding the target attribute to the tag <a> tag Lecture 8