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.

Slides:



Advertisements
Similar presentations
Introduction to Web Design Lecture number:. Todays Aim: Introduction to Web-designing and how its done. Modelling websites in HTML.
Advertisements

Working with Images and HTML
Presenter: James Huang Date: Sept. 26,  Introduction  Basics  Lists  Links  Forms  CSS 2.
Creating Pages in XHTML
MMDE5011 – INTERACTIVE MEDIA PRACTICE 1 WEEK 1: INTRODUCTION TO HTML5
XP 1 Developing a Basic Web Site Tutorial 2: Web Site Structures & Links.
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.
HTML Introduction (cont.) 10/01/ Lecture 8, MAT 279, Fall 2009.
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.
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
Hyperlinks. Working with Linked Images  A standard practice on the Web is to turn the Web site’s logo into a hypertext link pointing to the home page.
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.
Tags through Forms. This element is required for all HTML pages It must be at the top of every page of every website We’ll see later on why it is important.
Computer Sciences Department
HTML Tags. Objectives Know the commonly used HTML tags Create a simple webpage using the HTML tags that will be discussed.
Basics of HTML.
Tutorial 2 Developing a Web Site
Web Design HTML, Frontpage, DreamWeaver μέρος β ΠΡΥ019 - Πληροφορική Δρ.Βάσος Βασιλείου.
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.
HTML HTML stands for "Hyper Text Mark-up Language“. Technically, HTML is not a programming language, but rather a markup language. Used to create web pages.
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.
Programming in HTML.  Programming Language  Used to design/create web pages  Hyper Text Markup Language  Markup Language  Series of Markup tags 
Agenda Links External and Internet Links Anchor Tag Text Hyperlinks Image Hyperlinks Images Image Attributes: src, alt, width, height, align, border.
Hyperlinks. Linking pages…Hyperlinks 2 Lecture 8  Hyperlink “A clickable HTML element that will direct the web browser to display a different Web page.
Understanding HTML Code
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.
HTML history, Tags, Element. HTML: HyperText Markup Language Hello World Welcome to the world!
Website Development with Dreamweaver
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.
DHTML AND JAVASCRIPT Genetic Computer School LESSON 2 HTML TAGS G H E F.
Programming in HTML.  Programming Language  Used to design/create web pages  Hyper Text Markup Language  Markup Language  Series of Markup tags 
Introduction to HTML. What is a HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup tags  The.
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.
HTML, CSS, and XML Tutorial 2 Developing a Web Site.
Unit 2, cont. September 12 More HTML. Attributes Some tags are modifiable with attributes This changes the way a tag behaves Modifying a tag requires.
Unit 3 Day 6 FOCS – Web Design. Journal Unit #3 Entry #4 Write the source code that would make the following display on a rendered page: Shopping List.
Chapter 4 BIE1313/BPROG1203 | Web design Prepared by Mohamed Abdulkarim / Mike Ng Ah Ngan.
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.
Week 1 – Beginners Content McAfee & Big Fish Games CoderDojo.
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
HTML Lesson 3 Hyper Text Markup Language. Assignment Part 2  Set the file name as “FirstName2.htm”  Set the title as “FirstName LastName First Web Site”
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.
HTML GUIDE Press F5 and then Click on the links on the left to get to the section you want Section 1: Getting Started Section 2: Moving Banner Section.
1 HTML Frames
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.
HTML Introduction. Lecture 7 What we will cover…  Understanding the first html code…  Tags o two-sided tags o one-sided tags  Block level elements.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
HTML CS 105. Page Structure HTML elements control the details of how a page gets displayed. Every HTML document has the following basic structure: … …
REEM ALMOTIRI Information Technology Department Majmaah University.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
`. Lecture Overview HTML Body Elements Linking techniques HyperText references Linking images Linking to locations on a page Linking to a fragment on.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
HTML Tutorial. What is HTML HTML is a markup language for describing web documents (web pages) HTML documents are described by HTML tags Each HTML tag.
Lecture 6, MAT 279, Fall HTML Introduction (cont.) 9/17/2009.
HTML5 and CSS3 Illustrated Unit E: Inserting and Working with Links.
HTML Structure & syntax
Fall 2016 CSULA Saloni Chacha
Introduction to HTML.
HTML Basics.
HTML Images CS 1150 Spring 2017.
CNIT 131 HTML5 – Anchor/Link.
Basic HTML and Embed Codes
HTML Introduction Lecture 8.
HTML Images CS 1150 Fall 2016.
Pertemuan 1b
Pertemuan 1 Desain web Pertemuan 1
Presentation transcript:

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 till Oct. 3  Open-book, open note exam. Lecture 8

What we have learned so far:  1 Basic HTML page development  2 Tags… (example?)  3 Lists… (example?)  4 Single Tag… (example?)  Some useful resources:   Lecture 8

Today, we will cover 1. Attributes of tags 2. Image handling in HTML 3. Hyperlinks Lecture 8

What if I decide to change the style of the texts inside the Tags? Attributes in Tags

Lecture 8 Attributesin tags  Attribute - a property of an HTML element (tag)  Control appearance of elements in the document  consists of  attribute_name and  attribute_value  used with opening tag  General syntax content

The Attributes  Example: ALIGN attribute  Used for aligning text in a web browser attribute_name: ALIGN atribute_value: LEFT | CENTER | RIGHT  Example usage: Earlier we used: Welcome to MAT 279 Now: Welcome to MAT 279  There are many attributes we will learn in this class  Some of them can be readily used with most of the tags  Some are tag-specific Lecture 8

The Attributes (contd.) Lecture 8

More recent: style attribute  controls how the browser displays an element  used with opening tag  syntax content  rules  a set of style rules  entered by specifying a style name followed by a colon and then a style value style=“name1:value1; name2:value2; …”  e.g. Welcome to MAT 279

More about Style Later when we study CSS

Image Handling  So far, we have covered only texts  Now, we will learn how to do image handling  What is the tag for image element? Lecture 8

Image tag  tag: place images on Web Pages  One sided tag  Necessary attributes for :  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:  Lecture 8

Image tag (contd.)  How to specify size of the image file to be displayed?  Use attributes  attribute_name: width, height  attribute_value: define the width or the height of image  example: Lecture 8

Image tag (contd.)  Width and height attribute  attribute_value: define the width or the height of image  Two types of units  Pixels: number of pixels (eg, “100px” or just “100”)  Percent: (eg, “20%”)  example: Lecture 8

Image tag (contd.)  place an image in center of a browser  Use, … tag  example  Alternatively, Lecture 8

An interesting attribute – “title”  title can also be used as an attribute  Shows a pop-up title for your element  Mostly used with images for description  General syntax  title=“value” Lecture 8

Few things to 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 tag  Example  if 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

How to link multiple pages?

Linking pages…Hyperlinks Lecture 8  Hyperlink “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.”

Hyperlinks Lecture 8  What is the tag?  …,  Necessary attribute is href  href = “a link destination”  example Tutorial link label, visible on a Web page, where you will click link destination

Hyperlinks  Three type of Hyperlinks  Absolute URL links to a Web page on a different Web server a complete URL should be used e.g.,  Relative URL links to a Web page on the same Web server only need relative directory for the linked file  Name id links to a different location on the same Web page links to a different location on the different Web page Lecture 8

Absolute URL Lecture 8 Instructor’s website link label, visible on a Web page, where you will click link destination

Relative URL Lecture 8 My Page 2 link label, visible on a Web page, where you will click link destination My Page 3 link label, visible on a Web page, where you will click link destination

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

Working with Linked Images  A standard practice on the Web is to turn the Web site’s logo into a hypertext link pointing to the home page Image Lecture 8

Hands-on Practice Lecture 8 Link the JJ streetsign image to JJ homepage

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 content e.g., Welcome to MAT 279  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 content e.g., Go to the top of the page. 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 content  filename is the file name of destination HTML file  id is the id name of an element in the destination file  e.g Go to the second paragraph of the tutorial 31 Lecture 9