`. Lecture Overview HTML Body Elements Linking techniques HyperText references Linking images Linking to locations on a page Linking to a fragment on.

Slides:



Advertisements
Similar presentations
Intro to HTML Basics HTML = Hypertext Mark-up Language HTML = Hypertext Mark-up Language HTML is a plain-text file that can be created using a text editor.
Advertisements

HTML Basics Customizing your site using the basics of HTML.
Chapter 3 – Web Design Tables & Page Layout
HTML: HyperText Markup Language Hello World Welcome to the world!
Presenter: James Huang Date: Sept. 26,  Introduction  Basics  Lists  Links  Forms  CSS 2.
Chapter 4 Marking Up With Html: A Hypertext Markup Language Primer.
1 HTML Markup language – coded text is converted into formatted text by a web browser. Big chart on pg. 16—39. Tags usually come in pairs like – data Some.
LIST- HYPERLINK- IMAGES
HTML and XHTML Controlling the Display Of Web Content.
XHTML II DIGITAL MEDIA: COMMUNICATION AND DESIGN F2007.
XHTML1 Tables and Lists. XHTML2 Objectives In this chapter, you will: Create basic tables Structure tables Format tables Create lists.
Introduction to Web Site Development Steven Emory Department of Computer Science California State University, Los Angeles Lecture 3: Hyperlinks and Images.
 2008 Pearson Education, Inc. All rights reserved. 1 Introduction to HTML.
Database-Driven Web Sites, Second Edition1 Chapter 2 INTRODUCTION TO HTML.
Computer Science 103 Chapter 2 HyperText Markup Language (HTML)
 2003 Prentice Hall, Inc. All rights reserved. Chapter 4 - Introduction to XHTML: Part 1 Outline 4.1 Introduction 4.2 Editing XHTML 4.3 First XHTML Example.
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Chapter 14 Introduction to HTML
HTML Tags. Objectives Know the commonly used HTML tags Create a simple webpage using the HTML tags that will be discussed.
1 The Structure of a Web Table beginning of the table structure first row of three in the table end of the table structure table cells You do not need.
Presenting Information on WWW using HTML. Presenting Information on the Web with HTML How Web sites are organized and implemented A brief introduction.
Chapter 4 Fluency with Information Technology L. Snyder Marking Up With HTML: A Hypertext Markup Language Primer.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
HTML (HyperText Markup Language)
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.
Chapter 4: Hypertext Markup Language Primer TECH Prof. Jeff Cheng.
HTML Overview Part 4 – Tables 1. HTML Tables  Tables are defined with the tag pair.  A table is divided into rows with tag pairs. o tr stands for "table.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML Pt. 2.
 HTML stands for Hyper Text Mark-up Language. The coding language used to create documents for the World Wide Web  HTML is composed of tags. HTML tags.
Images (1) Three most popular formats – Graphics Interchange Format (GIF) – Joint Photographic Experts Group (JPEG) – Portable Network Graphics (PNG) –
HTML history, Tags, Element. HTML: HyperText Markup Language Hello World Welcome to the world!
CP2022 Multimedia Internet Communication1 HTML and Hypertext The workings of the web Lecture 7.
HTML. Basic HTML HTML document – HTML headings – to HTML paragraphs – HTML links – HTML images –
Basic HTML Workshop By: Preeda Chunjongkolkul (Pete) Systems Librarian/Webmaster
HTML 4 Foundation Level Course HyperText Markup Language Most common language used in creating Web documents. You can use HTML to create cross-platform.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
LEARN THE QUICK AND EASY WAY! VISUAL QUICKSTART GUIDE HTML and CSS 8th Edition Chapter 6: Links.
Chapter 2 XHTML: Part II The Web Warrior Guide to Web Design Technologies.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Adding Links Learning Web Design: Chapter 6. Lesson Overview Using the anchor tag Linking to other pages with relative or absolute pathnames Linking to.
HTML: Hyptertext Markup Language Doman’s Sections.
XHTML 1.1  Derived from Standard Generalized Markup Language (SGML) of ISO  XHTML concerned primary with content rather than presentation and style 
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
CSE 409 – Advanced Internet Technology 1 DISCUSSION OF BASIC HTML TAGS.
2.1 XHTML. Motto High thoughts must have high language. –Aristophanes.
HTML Basics. HTML Coding HTML Hypertext markup language The code used to create web pages.
1 Lecture 12 Lecture 12 Basic HTML ITEC 1000 “Introduction to Information Technology”
1 Creating the Home Page. 2 Creating a Table Table attributes  Two rows and two columns  No border  Left-aligned Change the vertical alignment of the.
XP Review 1 New Perspectives on JavaScript, Comprehensive1 Introducing HTML and XHTML Creating Web Pages with HTML.
Assistant Professor,UCER Naini,Allahabad
REEM ALMOTIRI Information Technology Department Majmaah University.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
LINKING WEBPAGES USING HTML HYPERLINKS. Hyperlinks are text strings or images on a webpage which when clicked on, links to another section in the same.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring
INT222 – Internet Fundamentals
HTML for web designing short course. What is an HTML File? HTML stands for Hyper Text Markup Language An HTML file must have an htm or html file extension.
01 – HTML (1) Informatics Department Parahyangan Catholic University.
Glencoe Introduction to Web Design Chapter 4 XHTML Basics 1 Review Do you remember the vocabulary terms from this chapter? Use the following slides to.
HTML Hyper Text Markup Language. What is HTML HTML stands for the Hyper Text Markup Language. HTML stands for the Hyper Text Markup Language. HTML is.
HTML Basics.
Marking Up with XHTML Tags describe how a web page should look
The Web Warrior Guide to Web Design Technologies
Marking Up with XHTML Tags describe how a web page should look
Marking Up with XHTML Tags describe how a web page should look
Introduction to HTML.
Marking Up with XHTML Tags describe how a web page should look
Presentation transcript:

`

Lecture Overview HTML Body Elements Linking techniques HyperText references Linking images Linking to locations on a page Linking to a fragment on another page Linking to mail software Ordering links to a new window Image maps List Table

HTML Body Element The element encloses all page contents. Example web page contents: –Text –List –Image –Etc.

HTML Body Element - TEXT There are two categories of text element: Block elements –For marking up large blocks of content such as headings and paragraphs Inline elements –For marking up individual words or phrases or to emphasize words in a sentence.

HTML Body Element - TEXT Headings There are six different levels of heading: – is the top level heading content, e.g. site or page title is the for the least important heading, e.g. a sub-section This is heading 1

HTML Body Element - TEXT Paragraph The element defines a paragraph. When a browser displays a paragraph, it adds a new line before the paragraph. Paragraphs should not be nested inside other paragraphs. The purpose of this page is to demonstrate a basic XHTML document.

HTML Body Element - TEXT Inline element Inline elements are used to markup small portions of text. Inline elements must always be nested inside a block level element. The purpose of this page is to demonstrate a basic XHTML document.

HTML Body Element - TEXT Styling your text HTML used to feature many ‘physical style’ tags Tags such as can be join with several attributes to specify the colour, typeface and size of text. This is so red

HTML Body Element - IMAGE An image can be specified using as shown below. src is use to specify the location of the image width is use to specify the width of the image height is use to specify the height of the image alt is use to specify alternative text in case the image is corrupted. ** Picture should be saved in similar directory with HTML document

Linking Techniques Links on a website can be created using an attribute called a HyperText reference (href) which is applied to an anchor element. For example:

Linking Techniques Two ways of linking: Text based & Image based. Text based

Linking Techniques Image based

HyperText References HyperText references provides the path of the link for the browser to follow. –The path can be: Linking to a page within the site Linking to a page outside of the site –The link can be: (X)HTML documents Images Documents Multimedia elements

HyperText References Linking to a page within the site. –When linking to a page within your site server, relative URLs are used. –For example if linking to page2.html of your site just use the pathname: Linking to a page outside of the site. –When linking to pages or sites external to your site, server absolute URLs are used –For example, when linking to include the full protocol and path to the page:

HyperText References Some rules when linking to pages within the site: If the (X)HTML page is within the same directory, use: If the (X)HTML page is within a lower directory, use:

HyperText References Some rules when linking to pages within the site: If the (X)HTML page is within an even lower directory, use: If the (X)HTML page is within a higher directory, use the Unix pathname convention “../”

HyperText References Some rules when linking to pages within the site: If the (X)HTML page is within an even higher directory, use: Do not use backslashes - instead use forward slashes “/” for web programming to separate directory and file components of a path

Linking Images Linking images also has several rules: If you are in page2.html as shown in structure below and would like to use picture.gif, use:

Linking Images Linking images also has several rules: If you are in page2.html as shown in structure below and would like to use picture.gif:

Linking to Locations on A Page Known as linking to a document fragment. Allows you to link to specific points on a page. Clicking on a subject in the contents at the top of the page allows the user to be directed to the desired heading further down the page.

Linking to Locations on A Page To do linking to locations on a page, two features are needed:  Name the destination using the id attribute  Link to the destination using the octothorpe symbol (#) The id attribute The actual headings in the body of the page need to be marked with the id attribute. This uniquely identifies an element within the contents for the browser to find. For example, in the main body of text, Heading 1 would read:

Linking to Locations on A Page The octothorpe symbol (#) Each heading is linked to the corresponding text by including the # value in the href attribute. The destination is given a name, in this case “hereisH1” for the first heading:

Linking to A Fragment on Another Page Add the fragment name to the end of the page URL in the href link. For example if the headings were all contained within “page4.html”, a page in the same directory, the link would read:

Linking to Mail Software mailtoUse the mailto protocol. This allows users to send s to the specified address from client-side software. example, linking to an address can be write as the following:

Opening Links in A New Window Use the target attribute in the anchor element. This will tell the browser in which window the linked content should be displayed For example: This will open all links with this target in a window called “display1”

Image Maps An imagemap is a defined region of an image that is given a link. For a client-side imagemap, the browser is required to match the location of the user’s mouse to the coded coordinates of the linked area.

Image Maps To produce an imagemap you will need: –An image file within an element –A usemap attribute within the element that defines the map in use –A element that contains the definitions of each of the required elements to be applied to the image

Image Maps For example, an image split into 2 coloured regions that link to 2 separate pages: The “usemap” attribute tells the browser to use the “2pages” map with the image.

Image Maps Shape Values In this example the shape values chosen are a circle and square. The values are based on the coords.

HTML Elements - LIST List of items can be specify using, and. –The tags specify an unordered (bullet pointed) list. –The tags specify an ordered list. –The elements define each item in the list. Triangle Quadrilateral Pentagon Hexagon Triangle Quadrilateral Pentagon Hexagon

HTML – Table’s Structure In (X)HTML the structure of the same table is: Tables are constructed from cells Cells contain the content of the table A cell can contain any content, from graphics to multimedia content to even other tables

HTML – TABLE – Element Definition is a block level element that always starts on a new line. (X)HTML tables are “row-centric” as there are no column elements. The number of cells in each row determines the number of columns.

HTML – TABLE – Element Definition The (X)HTML elements would appear like this: If the elements don’t match up, the browser will not display the table correctly

HTML – TABLE – Element Definition Shown left is the (X)HTML source for this table as it would be written within the main body of the page. The convention is to stack the elements to make them easier to locate in the code.

HTML – TABLE – Columns & Rows Column spans are generated with the colspan attribute within the or elements. These resize a cell to the right to make it span over the preceding columns. For example:

HTML – TABLE – Columns & Rows (X)HTML for merging columns:

HTML – TABLE – Columns & Rows Row spans are similar to column spans but merge rows instead. For example:

HTML – TABLE – Columns & Rows (X)HTML for merging row:

HTML – TABLE – Cell Padding Cell Padding is the amount of space between the cell content and the edge of the cell containing it. The default value for cell padding is 1 pixel

HTML – TABLE – Cell Padding The cellpadding attribute can only be applied to the element. This means that all cells within the table are affected by it. The value of cellpadding can be defined. For example: If cell by cell values are required, CSS can be used to fine tune the padding.

HTML – TABLE – Cell Spacing Cell Spacing is the amount of space between the cells. The browser default is 2 pixels. To change this value, use the cellspacing attribute in the element:

HTML – TABLE – Caption To give the table a brief title or description, use the element. The caption is displayed above the table by default. The caption must be the first thing in the element.

HTML – TABLE – Caption

References Robbins, J.N. (2007) Learning Web Design – A Beginners Guide to (X)HTML, Style Sheets, and Web Graphics. 2nd edition. Galatea Training Services Ltd.. Singapore