Web Technologies COMP6115 Session 2: Planning, Designing, Constructing and Testing Static Web Sites Dr. Paul Walcott Department of Computer Science, Mathematics.

Slides:



Advertisements
Similar presentations
Use Tables for Layout Control Day 7. You will learn to: Understand Tables Create a Simple Table Modify Your Tables Appearance Create Page Layouts with.
Advertisements

Tutorial 5 Working with Web Tables
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 6: HTML Tables.
Working with Web Tables
CREATED BY : VIRAL M.KORADIYA. Anchor elements are defined by the element. The element accepts several attributes, but either the Name or HREF attribute.
HTML/XML XHTML Authoring. Creating Tables  Table: An arrangement of horizontal rows and vertical columns. The intersection of a row and a column is called.
New Perspectives on Creating Web Pages with HTML
Tutorial 4: Designing a Web Page with Tables
Web Technologies COMP6115 Session 2: Planning, Designing, Constructing and Testing Static Web Sites Dr. Paul Walcott Department of Computer Science, Mathematics.
HTML and XHTML Controlling the Display Of Web Content.
© 2004, Robert K. Moniot Chapters 4 & 5 Introduction to HTML, More Details.
XHTML1 Tables and Lists. XHTML2 Objectives In this chapter, you will: Create basic tables Structure tables Format tables Create lists.
XP 1 New Perspectives on Creating Web Pages with HTML Tutorial 4: Designing a Web Page with Tables.
XP 1 Designing a Web Page with Tables Tutorial 4 Creating a News Page.
Unit 2, cont. September 14 HTML,Validating your pages, Publishing your site.
Creating a Web Page with Tables. Objectives Create a text table with preformatted text Create the basic structure of a graphical table Organize table.
23-Jun-15 HTML. 2 Web pages are HTML HTML stands for HyperText Markup Language Web pages are plain text files, written in HTML Browsers display web pages.
XP Creating Web Pages with HTML Using Tables. XP Objectives Create a text table Create a table using the,, and tags Create table headers and captions.
 2008 Pearson Education, Inc. All rights reserved. 1 Introduction to HTML.
Using HTML Tables.
Week 1 8/10/2015iSTTS, Agenda Introduction to HTML Creating and publishing a Web page Validating a document Main HTML elements Block-level HTML.
HTML. Creating a Table Attributes: border: indicates the border type of the table Value: 0 (no border), 1, 2, etc. cols: indicates the number of columns.
INTRODUCTION TO WEB DEVELOPMENT AND HTML Lecture 06: Tables - Spring 2011.
XHTML1 Tables N100 Creating a Simple Web Page. XHTML2 Creating Basic Tables Tables are collections of rows and columns that you use to organize and display.
Identifies the Structure Table Row Column 1 Table Heading Column 2.
CIS 1315 – Web Development for Educators CIS 1315 HTML Tutorial 5: Working with Tables.
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.
CpSc 462/662: Database Management Systems (DBMS) (TEXNH Approach) HTML Basics James Wang.
CHAPTER 11 Tables. How Are Tables Used Data Display  Very tidy and very useful Better Text Alignment  Putting text in tables allows you to format indents.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
HTML Overview Part 2 – Paragraphs, Headings, and Lines 1.
Web Technologies COMP6115 Session 2: Planning, Designing, Constructing and Testing Static Web Sites Dr. Paul Walcott Department of Computer Science, Mathematics.
Tutorial 5 Working with Web Tables. XP Objectives Explore the structure of a Web table Create headings and cells in a table Create cells that span multiple.
Web Technologies COMP6115 Session 2: Planning, Designing, Constructing and Testing Static Web Sites Dr. Paul Walcott Department of Computer Science, Mathematics.
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.
Lecture: Tables. Table Tags (all container tags) establishes a table (________) establishes a row (________) says what’s in the row more than one TD within.
Chapter 4: Hypertext Markup Language Primer TECH Prof. Jeff Cheng.
HTML Introduction to HTML Tags. HTML Document My first HTML document Hello world!
1 eVenzia Technologies Learning HTML, XHTML & CSS Chapter 2.
>> Introduction to HTML: Tables. HTML is used to give websites structure 5 Basic Tags Element = Start-Tag+Content+End-Tag Heading Tags [h1-h6] Paragraph.
CNIT 132 – Week 7 HTML - Tables. Tables on the World Wide Web A table can be displayed on a Web page either in a text or graphical format. A text table:
CS105 INTRODUCTION TO COMPUTER CONCEPTS HTML Instructor: Cuong (Charlie) Pham.
Designing a Web Page with Tables. A text table: contains only text, evenly spaced on the Web page in rows and columns uses only standard word processing.
Department of Information Technology Chapter 9 – Creating Tables Lecturer: Ms Melinda Chung.
Tutorial 5 Working with Tables and Columns
XP Creating Web Pages with HTML, 3e Prepared by: C. Hueckstaedt, Tutorial 4 1 New Perspectives on Creating Web Pages with HTML Tutorial 4: Designing a.
XHTML1-1 Extensible HyperText Markup Language (XHTML) Part 2 Xingquan (Hill) Zhu
HTML (Hypertext Markup Language) – Class 3 Recap: HTML Special Characters (ex: ©). Including Images – using the tag. Lists – Ordered and Unordered.
Introduction HTML (Hypertext Markup Language) is used to create document on the World Wide Web. HTML is not a programming language, it is a markup language.
Introducing Web Tables. Tables for tabulating items  Better looking  More flexibility  More efficient to explain information than plain text.
TABLES 1. In this chapter you will learn that tables have many uses in HTML. Objectives: Upon completing this section, you should be able to: 1. Insert.
Lesson 7. Tables Table Tags and Attributes Tables HTML tables are used in two main ways: 1.To organize tabular data in a familiar spreadsheet-like way.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Project 5: Working with Tables Kelly L.
CIS234A Lecture 8 Instructor Greg D’Andrea. Review Text Table contains only text, evenly spaced on the Web page in rows and columns uses only standard.
Introduction to Web Authoring Ellen Cushman /wra210.htm Class mtg. #2.
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
©SoftMoore ConsultingSlide 1 Introduction to HTML: Block-Level Elements.
Tutorial 5: Tables Session OBJECTIVES Create a table Insert a table summary Insert a table caption Add rows and cells Merge Cells inside a Table.
1 R3 R1 R5 R4 R6 R2 B B A A Looking at the Code Under the View menu Select Source.
Tutorial 5 Working with Web Tables. New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition 2 Objectives Learn and Apply the structure of.
Introduction to Web Authoring Bill Hart-Davidson AIM: billhd30 Session 2
Designing a Web Page with Tables
Working with Tables: Module A: Table Basics
>> HTML: Tables.
Using HTML Tables SWBAT: - create tables using HTML
Introduction to XHTML Cont:.
Introduction to HTML.
Site Development Foundations Lesson 6
Lesson 5: HTML Tables.
Presentation transcript:

Web Technologies COMP6115 Session 2: Planning, Designing, Constructing and Testing Static Web Sites Dr. Paul Walcott Department of Computer Science, Mathematics and Physics University of the West Indies, Cave Hill Campus Barbados 29/11/06 © 2006/2007 Dr. Paul Walcott

Constructing Web Pages So far we have only constructed a simple Web page So far we have only constructed a simple Web page In order to construct a more complicated Web page we need to learn some more XHTML elements. In order to construct a more complicated Web page we need to learn some more XHTML elements. In this section we will look at: In this section we will look at: –,,,,,,,, –,,,,,,,, Also see the following Web sites: Also see the following Web sites:

Constructing Web Pages (Cont’d) Bold Function Function –Renders as bold text An XHTML 1.0 Code Example An XHTML 1.0 Code Example This text is bold This text is bold Things to Note Things to Note –Although this is valid XHTML 1.0 you should really use styles sheets instead Most browsers will render the tag in bold anyway Most browsers will render the tag in bold anyway –The BOLD element is not a child of the BODY element – it is a child of DIV though

Constructing Web Pages (Cont’d) Strong Function Function –Renders as strong emphasised text An XHTML 1.0 Code Example An XHTML 1.0 Code Example This is strong text This is strong text Things to Note Things to Note –Most browsers will render the tag in bold –The BOLD element is not a child of the BODY element – it is a child of DIV though

Constructing Web Pages (Cont’d) Italics Function Function –Renders as italics text An XHTML 1.0 Code Example An XHTML 1.0 Code Example This text is in italics This text is in italics Things to Note Things to Note –Although this is valid XHTML 1.0 you should really use styles sheets instead Most browsers will render the tag (emphasise) in italics anyway Most browsers will render the tag (emphasise) in italics anyway –The BOLD element is not a child of the BODY element – it is a child of DIV though

Constructing Web Pages (Cont’d) Emphasise Function Function –Emphasises text An XHTML 1.0 Code Example An XHTML 1.0 Code Example This text is emphasised This text is emphasised Things to Note Things to Note –Most browsers will render this tag as italics –The BOLD element is not a child of the BODY element – it is a child of DIV though

Constructing Web Pages (Cont’d) Paragraph Function Function –Specifies a paragraph An XHTML 1.0 Code Example An XHTML 1.0 Code Example This is a paragraph This is a paragraph Things to Note Things to Note –This element is separated from other elements by a vertical break

Constructing Web Pages (Cont’d) PreFormat Function Function –Specifies pre-formatted text An XHTML 1.0 Code Example An XHTML 1.0 Code Example This text is on the first line This text is on the first line This text is on the second line This text is on the second line and, this text is on the third line and, this text is on the third line

Constructing Web Pages (Cont’d) PreFormat Things to Note Things to Note –Line breaks and spaces embedded in text with tags are normally preserved –A fixed pitch font is normally used –Is a child of the tag

Constructing Web Pages (Cont’d) Horizontal Rule Function Function –Inserts a horizontal rule/line An XHTML 1.0 Code Example An XHTML 1.0 Code Example Things to Note Things to Note –This tag must be closed

Constructing Web Pages (Cont’d) Anchor Tag Function Function –Defines an anchor; creates a bookmark within a document or a hyperlink to another document An XHTML 1.0 Code Example An XHTML 1.0 Code Example Section 1 Section 1 … Link to Section 1 Link to Section 1 Go to Google Go to Google

Constructing Web Pages (Cont’d) Tables Function Function –Creates a table An XHTML Code Example An XHTML Code Example – – row 1, col 1 row 1, col 2 row 2, col 1 row 2, col 2 row 1, col 1 row 1, col 2 row 2, col 1 row 2, col 2

Constructing Web Pages (Cont’d) Tables Things to note Things to note –Tables may be nested –The table element is a child of the body element Optional attributes for the tag Optional attributes for the tag –Cellspacing – specifies the spacing in pixels between adjacent cells –Cellpading – specifies the spacing in pixels between the contents of a cell and the cell border

Constructing Web Pages (Cont’d) Tables Optional attributes for the tag (Cont’d) Optional attributes for the tag (Cont’d) –Width – sets the width of the table The width of a cell may be expressed as a number of pixels or a % of the screen’s width The width of a cell may be expressed as a number of pixels or a % of the screen’s width –Border – specifies the size of the border in pixels, a value of 0 means that there is no border

Constructing Web Pages (Cont’d) Tables Attributes for the tag Attributes for the tag –Rowspan – allows cells in adjacent rows to be merged –Colspan – allows cells in adjacent columns to be merged –Valign – sets the vertical alignment of the cell –Align – sets the horizontal alignment of the cell contents

Constructing Web Pages (Cont’d) Since tables are so important (they are widely used on the Web today) it is important to get a good grasp of them Since tables are so important (they are widely used on the Web today) it is important to get a good grasp of them We will achieve this through an extensive set of examples We will achieve this through an extensive set of examples

Constructing Web Pages (Cont’d) In our first example a simple table without a border is created In our first example a simple table without a border is created Notice how we use indentation in the XHTML code to make it easier to distinguish between the rows and the columns Notice how we use indentation in the XHTML code to make it easier to distinguish between the rows and the columns On our screenshot the code is in the left window, while the rendered XHTML is in the right window On our screenshot the code is in the left window, while the rendered XHTML is in the right window

Constructing Web Pages (Cont’d)

In our next example, we use the border attribute of the tag to give the table a border In our next example, we use the border attribute of the tag to give the table a border Constructing Web Pages (Cont’d)

In our next example we increase the number of pixels between the contents of the cell and the cell border In our next example we increase the number of pixels between the contents of the cell and the cell border This is achieved using the cellpadding attribute of the tag This is achieved using the cellpadding attribute of the tag Constructing Web Pages (Cont’d)

In our next example we increase the number of pixels between adjacent cells In our next example we increase the number of pixels between adjacent cells This is achieved using the cellspacing attribute of the tag This is achieved using the cellspacing attribute of the tag Constructing Web Pages (Cont’d)

Sometimes we want a cell in a table to span more than one cell Sometimes we want a cell in a table to span more than one cell This is achieved through the colspan attribute which merges adjacent horizontal cells This is achieved through the colspan attribute which merges adjacent horizontal cells The value this attribute is set to determines the number of cells that are merged The value this attribute is set to determines the number of cells that are merged See our example See our example Constructing Web Pages (Cont’d)

We can set the horizontal alignment of the contents of a cell through the use of the align attribute as shown in our next illustration We can set the horizontal alignment of the contents of a cell through the use of the align attribute as shown in our next illustration Constructing Web Pages (Cont’d)

Not only can we merge cells horizontal, we can also do it vertically Not only can we merge cells horizontal, we can also do it vertically This can be seen in our next example This can be seen in our next example –Notice the use of the rowspan attribute In addition this example demonstrates how vertical align is achieved through the use of the valign attribute In addition this example demonstrates how vertical align is achieved through the use of the valign attribute Constructing Web Pages (Cont’d)

If you need to change the height or width of a cell you should use cascading style sheets If you need to change the height or width of a cell you should use cascading style sheets An interesting occurs when a given cell is left blank An interesting occurs when a given cell is left blank –the given cell will not have a border To solve this problem simply add a non- breaking space (i.e. ) To solve this problem simply add a non- breaking space (i.e. ) Constructing Web Pages (Cont’d)

Special Characters In HTML special characters, called character entities, are represented in two possible ways: In HTML special characters, called character entities, are represented in two possible ways: – &code; – &#number; A list of some of the popular special characters have been presented below A list of some of the popular special characters have been presented below Constructing Web Pages (Cont’d)

Code Special Character A non-breaking space << >> ¼¼ & or & & "“ ©© &apos;‘ Constructing Web Pages (Cont’d)

References [1] Darnell, Rick, et al., “HTML4: Unleased”, Sams.net Publishing, First Edition, 1997 [2] Deitel, H., Deitel, P., Nieto, Frank, L., Lin, Ted, M., Sadhu, Praveen, “XML: How to Program”, Prentice-Hall Inc., 2001