TABELE.

Slides:



Advertisements
Similar presentations
Using HTML Tables Presenting Information & Layout Control.
Advertisements

HTML Tables Introduction to Tables Introduction to Tables Table Format Table Format Table Captions Table Captions Table Example Table Example Excercise.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 6: HTML Tables.
Chapter 4 – Intermediate HTML 4 Outline 4.1 Unordered Lists 4.2 Nested and Ordered Lists 4.3 Basic HTML Tables 4.4 Intermediate HTML Tables and Formatting.
HTML TABLES Cyndi Hageman. Tables   Attributes Name or id – used to identify the table Border = set this to determine if there is a border and the size.
Lists and Tables Cool sites Lists unordered, ordered, definition Tables basic.
1 Tables: Data in Rows and Columns – What is Table? – How Tables are Used? – Designing Tables – Table, Cell, Row Attributes – Using Tables for Alignment.
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.
Images and Tables. Displaying Image Attributes: SRC= " mypic.gif " – Name of the picture file SRC= " pic/mygif.jpg " – Name of file found in pic directory.
Notes Ch. 12—Creating Tables Web Page Design. Why Use Tables? Tables are used to create a variety of items such as calendars, charts, and spreadsheets.
INTRODUCTION TO WEB DEVELOPMENT AND HTML Lecture 06: Tables - Spring 2011.
Lecture: Tables. Table Tags (all container tags) establishes a table (________) establishes a row (________) says what’s in the row more than one TD within.
1 eVenzia Technologies Learning HTML, XHTML & CSS Chapter 2.
HTML B OOT C AMP Chapter 10 Tables Kirkwood Continuing Education © Copyright 2015, Fred McClurg All Rights Reserved.
Introducing Web Tables. Tables for tabulating items  Better looking  More flexibility  More efficient to explain information than plain text.
A table is a rectangular arrangement of rows and columns on your screen A table is used to organize data into rows and columns and also increasingly.
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.
ECA 228 Internet/Intranet Design I Tables. ECA 228 Internet/Intranet Design I Basic HTML Tables Created as a way to present rows and clumns of data.
Tables in HTML. Table Tag HTML tables always begin and end with a table tag. Syntax:
 2003 Prentice Hall, Inc. All rights reserved. Introduction to HTML: Tables Outline 1 Introduction 2 Basic HTML Tables 3 Intermediate HTML Tables and.
CS-3432 Electronic Commerce Lecture – 7 Sikandar Shujah Toor
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.
Unit 4 Create and Use Tables. TITLE CORNELL NOTES TOPIC: NOTES: Name: Date: 09/08/2009 Period : Summary: Reasons for using tables Unit 4 Page 1 Display.
Tables Attributes Image Map.  Tables are defined with the tag.  A table is divided into rows with the tag.  Each row is divided into data cells with.
HTML newsletter. Pričaćemo o… HTML CSS HTML, CSS i newsletteri.
Hyper Text Markup Language
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Week 6 Creating Tables using HTML.
>> HTML: Tables.
LAB Work 02 MBA 61062: E-Commerce
Getting Started – Table 2
Introduction to HTML.
H T M L A B E S X P I N D.
Vežba II.
TABLES.
Slike, Hipertekst veze, Liste, Linije, Tabele
Creating Tables Steps for creating a Table Important Facts about Table
Табеле Табеле се представљају елементом TABLE.
Osnove HTML-a Hypertext Markup Language – jezik za opis hiperteksta
HTML stilovi Cascading Style Sheets (CSS)
4.1 Vizualni (grafički) HTML uređivači
1.Osnove HTML-a HyperText Markup Language – tekst procesor koji nije What You See Is What You Get HTML je standardizovan jezik koji se koristi na Web-u.
Pojam DBMS. Relacione baze podataka
CheckBox RadioButton RadioGroup
Internet mreže, FTN - KZI
مقدمة عن الإنترنت وفهم لغة HTML
KREIRANJE OBJEKATA.
Reference ćelije i opsega
Creating Tables Steps for creating a Table Important Facts about Table
Podešavanje osobina stranica
Vežba 1. Formatiranje teksta korišćenjem stilskih šablona
Kartica Insert.
TABLES.
Web Design and Development
Regional Center for Talented Youth Belgrade II
Element form Milena Kostadinović.
MessageBox.
Računarska grafika.
Obrada slike na računaru
Kaskadni opisi stilova
EXCEL 2 Formatiranje.
Do While ... Loop struktura
Uvod u HTML.
Home - Bullets & Numbering -
Single Tags <tagName> Example: <BR>
H T M L A B E S X P I N D.
Site Development Foundations Lesson 6
Creating Tables Steps for creating a Table Important Facts about Table
H T M L A B E S X P I N D.
CS205 Tables & Forms © 2012 D. J. Foreman.
Presentation transcript:

TABELE

Def Tabela je i u HTML-u dvodimenzionalna matrica čiji se elementi nazivaju ćelije (engl. cell). Ćelija može sadržati raznovrsne informacije: brojeve, tekst, boje, liste, hiper-veze, slike, itd. Tabela se sastavlja tako što se opisuju redom njene vrste (redovi, engl. row) i sadržaj svake ćelije u redu.

<table> Tabela se opisuje uz pomoć složenog taga <TABLE> koji može sadržavati više atributa: • BORDER koji opisuje širinu spoljašnjeg okvira tabele; • CELLSPACING koji opisuje širinu linije koja razdvaja dve ćelije; • CELLPADDING koji opisuje prostor oko sadržaja ćelije; • WIDTH koji opisuje ukupnu širinu tabele.

<caption> Nadnaslov tabele se može zadati tagom CAPTION koja se ispisuje iznad tabele i može imati atribut ALIGN: • za vertikalno poravnavanje: TOP, MIDDLE, BOTTOM • za horizontalno poravnavanje: LEFT, CENTER, RIGHT

<tr> Svaki red u tabeli se opisuje između tagova <TR> i </TR> (engl. table row). I tag TR može imati atribute: • za horizontalno poravnjavanje, atribut ALIGN sa vrednostima: LEFT, CENTER, RIGHT • za vertikalno poravnavanje, atribut VALIGN sa vrednostima: TOP, MIDDLE, BOTTOM

<td> Pojedinačna ćelija se opisuje između tagova <TD> i </TD>. Tag TD, pored atributa ALIGN i VALIGN, može imati i atribute: • za horizontalno spajanje ćelija: ROWSPAN (spaja ćelije iste vrste) i • za vertikalno spajanje ćelija: COLSPAN (spaja ćelije iste kolone) .

Razlika izmedju <td> I <th> Tag <TH> ima ista svojstva kao tag <TD> s tom razlikom što obezbeđuje da sadržaj ćelije bude automatski centriran i boldovan.

Neophodan uslov Tabela ne mora da sadrži <TH> tag, ali mora da sadrži bar jedan <TD> tag, u koji se smešta sadržaj tabele.

Opšta struktura tabele <TABLE> <!-- pocetak definicije tabele --> <CAPTION> sadrzaj naslova tabele </CAPTION> <!-- definicija naslova--> <TR> <!-- start definicije headera --> <TH> sadržaj prve ćelija headera </TH> <TH> sadržaj poslednje ćelije headera </TH>

</TR> <!-- kraj definicije headera --> <TR> <!-- start prvog reda --> <TD> sadržaj prve ćelije prvog reda </TD> <TD> sadržaj poslednje ćelije prvog reda </TD> <!-- kraj prvog reda --> <!-- start poslednjeg reda --> <TD> sadržaj prve ćelije poslednjeg reda </TD> <TD> sadržaj poslednje ćelije poslednjeg reda </TD> <!-- kraj poslednjeg reda --> </TABLE> <!-- kraj definicije tabele-->

Ivice tabele Ako se u kodu tabele ne navede određeni atribut tabele nemaju graničnu liniju, border. Da bi se dodelila tabeli granična linija odgovarajuće debljine, u <table> tag se stavlja atribut border, a vrednost debljine linije se zadaje u pikselima.

Primer <table border="2"> <tr> <th> Ime: </th> <th>Prezime:</th> <th>Zvanje:</th> </tr> <td>Betsy</td> <td>Bruce</td> <td><Predavac</td> </table>

Odredjivanje dimenzija ćelija i tabele Širina kolona je određena prvom ćelijom u svakoj koloni. Da bi tabela imala odgovarajuće dimenzije koriste se atributi height i width. Vrednost ovih atributa se kao i kod <img> taga može zadati ili u pikselima ili u procentima veličine prozora HTML browsera. <table border="2" height="30%“ width="80%">

Podešavanje dimenzija ćelija Da bi kolone bile jednake širine trebalo bi da u odgovarajuće <th> ili <td> tagove ubaciti atribute width sa željenom širinom. <table border="2" width="100%"> <tr> <th width="33%"> Ime </th> <th width="33%"> Prezime </th> <th width="33%"> Zvanje </th> </tr>

cellpadding Dva atributa koja imaju veliku primenu su cellpadding i cellspacing. Pomoću cellpadding atributa definiše se rastojanje između sadržaja ćelije i njene granične linije. Vrednost ovog atributa se zadaje u pikselima, ako se ne navede nijedna vrednost podrazumeva se da 1.

cellspacing Pomoću cellspacing atributa se može odrediti rastojanje između pojedinih ćelija tabele, tj. debljina linije između ćelija. Vrednost ovog atributa se zadaje, takođe, u pikselima ako se ne navede ni jedna vrednost podrazumeva se da 1.

Primer <table border="2" cellpadding="30" cellspacing="10">

Colspan i rowspan HTML dopušta mogučnost da se pojedine ćelije tabele protežu duž više redova ili kolona tabele. Ovakav efekat se može postići pomoću atributa colspan i rowspan, koji se ubacuju u <td> ili <th> tag one ćelije koja se želi posebno da formatira. Vrednost ovih atributa se zadaje brojem kolona ili redova tabele duž kojih treba da se prostire data ćelija.

Primer <table border="2" width="100%"> <tr> <th rowspan="2" colspan="2"><img src="space.gif"></th> <th colspan="5"> Dani u nedelji :</th> </tr> <th width="20%">ponedeljak</th> <th width="20%">utorak</th> <th width="20%">sreda</th> <th width="20%">cetvrtak</th> <th width="20%">petak</th>

<tr> <th rowspan="5">c<p>a<p>s<p>o<p>v<p>i</th> <th>1.</th> <td>srpski</td> <td>istorija</td> <td>fizicko</td> <td>hemija</td> </tr> <th>2.</th> <td>matematika</td>

<tr> <th>3.</th> <td>fizicko</td> <td>matematika</td> <td>istorija</td> <td>biologija</td> <td>engleski</td> </tr> <th>4.</th> <td>fizika</td> <td>informatika</td>

<tr> <th>5.</th> <td>fizika</td> <td>razredni</td> <td>geografija</td> <td>informatika</td> <td>matematika</td> </tr> </table>

Space.gif U prvu ćeliju tabele je postavljena slika tipa gif pod nazivom space.gif. Ovo je neophodno stoga što svaka ćelija tabele mora imati neki sadržaj, inace je browser neće prikazati.

Boje u tabeli HTML dozvoljava da cela tabela kao i svaka ćelija posebno može da ima različitu boju tagove: <table>, <td> ili <th>. Vrednost se zadaje heksadecimalnim kodom boje ili njenim imenom, isto kao i kod boje pozadine stranice u <body> tagu.

Prednost atribut bgcolor koji je zadat u <th> ili <td> tagu će se prikazati umesto one boje koja se nalazi u <table> tagu.

Boja okvira Takođe boja okvira tabele se može promeniti pomoću bordercolor atributa u <table> tagu.

Zadatak