SlideShare a Scribd company logo
HTML tables;
or,
Handy tips for organizing
information in your Omeka
exhibition
These slides were originally created by
Brenna Bychowski for a presentation at
AAS in February 2016.
Why tables?
Tables provide an effective, simple, and sometimes invisible method of
organizing a web page. They allow you to keep information separate (or
together), while keeping various elements consistently relative to each other.
Tables are surprisingly flexible, and they provide many layout and organizing
options for your pages.
Tables are created using HTML coding directly in your simple page or exhibit
page, and they can be customized individually in the HTML or all at once in
the CSS.
HTML Refresher
Like all HTML, tables are created using opening and closing tags. Tags are
enclosed in angle brackets <> and closing tags are preceded in the brackets by
a forward slash /.
<b>This text is bold.</b>
This text is bold.
<i>This text is in italics.</i>
This text is in italics.
Tags can be nested, creating multiple effects at once. Notice that tags are
closed in reverse order from being opened. E.g. <b><i></i></b>. NOT
<b><i></b></i>
<b><i>This text is bold and in italics.</i></b>
This text is bold and in italics.
Basic Table Tags
The following are the standard tags for
creating a table:
• <table>
o Defines the beginning and end of the
table .
• <tr>
o Defines a table row. This is
repeatable within <table> to create
as many rows as you would like.
• <td>
o Defines a cell within a table row.
Rows within a single table should
contain a consistent number of cells.
The cells line up to create table
columns.
Example:
<table>
<tr>
<td>This is row 1, cell 1.</td>
<td>This is row 1, cell 2.</td>
<td>This is row 1, cell 3.</td>
</tr>
<tr>
<td>This is row 2, cell 1.</td>
<td>This is row 2, cell 2.</td>
<td>This is row 2, cell 3.</td>
</tr>
</table>
This code creates a table with two rows,
with each row containing three cells.
Customizing Tables with HTML
Within the opening table tag <table>, you
can add elements to customize to look and
format of your table. Some options:
• align
o Justifies the table left, center, or
right.
• width
o Defines table width.
• border
o Defines thickness of the table border.
If you are only using tables to format
your page, not to look like tables, set
the border to 0.
• cellpadding
o This allows you to space out the cells
relative to each other.
Example:
<table align="center" width="50%"
border="0" cellpadding="5">
<tr>
<td>This is row 1, cell 1.</td>
<td>This is row 1, cell 2.</td>
<td>This is row 1, cell 3.</td>
</tr>
<tr>
<td>This is row 2, cell 1.</td>
<td>This is row 2, cell 2.</td>
<td>This is row 2, cell 3.</td>
</tr>
</table>
This table will be centered in the page it’s
on, it will be 50% of the width of the
page it’s on, and it will have no border.
Further Customization
Style
• The style element can be used in many
HTML tags, but for our purposes it can be
used in the table tag <table>, the table
row tag <tr>, and the table data <td> tag
• The style element allows you to
customize the look of the table
• The style element can be filled with CSS
properties and values, such as
o color
o font
o text-align
o background-color
o border-color
• Used in <table>, it affects the whole table.
Used in <tr>, it affects that row. Used in
<td>, it affects only that cell.
Examples (using only opening tags):
<table style="border-color:pink">
This table will have a pink border
<td style="text-align:center">
All text in this cell will be centered
<tr style="background-color:gray">
<tr style="background-color:white">
<tr style="background-color:gray">
The rows in this table will have
alternating background colors of gray
and white
Customizing in CSS
This is not the place to get into the deep
dark recesses of CSS, but if you want to
modify or format multiple tables at once in
the same way, CSS is the best place to do it.
This creates uniformity without having to
fiddle with the code of multiple tables.
You can adjust <table>, <tr>, and <td> in
the CSS, individually or in groups.
You can also specify in the CSS special
formatting for elements (such as images or
links) only when they appear in tables.
There are also some style and
customization changes that can only be
done via CSS and not HTML.
Examples (using only opening tags):
table h1 {
text-variant:small-caps
}
All text tagged h1 in tables will appear in
small caps
td a:link {
font-style:italic
}
All unclicked links in table cells will be
italicized
#home table img:hover {
opacity:.5
}
This is actual CSS from my Omeka
exhibition. The images in the table on my
home page will fade to 50% opacity when
the cursor hovers over them.
Adding Other HTML
Any standard HTML tags can be used within a table cell to define the data in the cells.
HTML:
<table>
<tr>
<td><i>Cell 1.</i></td>
<td><b>Cell 2.</b></td>
<td>Cell 3.</td>
</tr>
<tr>
<td>Cell 1.</td>
<td><i>Cell 2.</i></td>
<td><b>Cell 3.</b></td>
</tr>
<tr>
<td><b>Cell 1.</b></td>
<td>Cell 2.</td>
<td><i>Cell 3.</i></td>
</tr>
</table>
Cell 1 Cell 2 Cell 3
Cell 1 Cell 2 Cell 3
Cell 1 Cell 2 Cell 3
Resulting table:
Look! More Tables!
Tables can also be nested inside each other, for more granular organizing.
Example:
<table border="0">
<tr>
<td><center><img src="dimenovelcover.jpg."
width="75%"></td>
</tr>
<tr>
<td>
<table border="0"><tr>
<td><h3>Cedar Swamp; or, Wild Nat’s
Brigade</h3></td>
<td><p><i>Cedar Swamp</i> is a dime
novel. Dime novels are awesome.</p></td>
</tr></table>
</td>
</tr>
</table>
I’ve indented the second table in the above HTML for
clarity.
Cedar Swamp; or,
Wild Nat's Brigade
Cedar Swamp is a
dime novel. Dime
novels are
awesome.
Resulting table:
Additional Tips & Tricks
• Sometimes, you need a cell in your table for formatting reasons, but you want it to be
empty. The easiest way to do this is to use the following: <td>&nbsp;</td>. &nbsp; is
HTML code for a non-breaking space, but for our purposes creates an empty cell.
• It's generally best to compose your text outside of the Omeka editor, and then copy
and paste it in, and this is also true for any HTML work. However, I strongly
recommend NOT using a standard word processor to code HTML, as word
processors use special characters and coding that will cause problems with your
HTML code. It's best to use a generic text editor like Notebook, or the more
specialized Notebook++ (which is great for editing HTML).
Table References
Basic HTML coding
http://www.w3schools.com/html/html_tables.asp
Gives a good overview of the various HTML elements for creating and customizing
tables, including elements not discussed in this presentation
Basic CSS coding
http://www.w3schools.com/css/css_table.asp
Goes in-depth into the various customizations you can make to tables using CSS. It
can get pretty fancy, but it's all relatively straightforward and definitely fun to play
around with, if you're comfortable with CSS

More Related Content

What's hot

HTML Table Tags
HTML Table TagsHTML Table Tags
HTML Table Tags
Kainat Ilyas
 
html-table
html-tablehtml-table
html-table
Dhirendra Chauhan
 
Html tables
Html tablesHtml tables
Html tables
Sikandar Pandit
 
Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTMLDoncho Minkov
 
Images and Tables in HTML
Images and Tables in HTMLImages and Tables in HTML
Images and Tables in HTMLAarti P
 
Web forms and html lecture Number 3
Web forms and html lecture Number 3Web forms and html lecture Number 3
Web forms and html lecture Number 3
Mudasir Syed
 
Web topic 12 tables in html
Web topic 12  tables in htmlWeb topic 12  tables in html
Web topic 12 tables in htmlCK Yang
 
Computer language - Html tables
Computer language - Html tablesComputer language - Html tables
Computer language - Html tables
Dr. I. Uma Maheswari Maheswari
 
Frames tables forms
Frames tables formsFrames tables forms
Frames tables forms
nobel mujuji
 
Bootstrap cheatsheet
Bootstrap cheatsheetBootstrap cheatsheet
Bootstrap cheatsheet
mp3 mask
 
Chapter 8: Tables
Chapter 8: TablesChapter 8: Tables
Chapter 8: Tables
Steve Guinan
 
Html introduction Part-2
Html introduction Part-2Html introduction Part-2
Html introduction Part-2
AAKASH KUMAR
 
HTML Tutorials
HTML TutorialsHTML Tutorials
HTML Tutorials
Arvind Kumar
 
HTML Dasar : #9 Tabel
HTML Dasar : #9 TabelHTML Dasar : #9 Tabel
HTML Dasar : #9 Tabel
Sandhika Galih
 
Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)club23
 
CSS
CSSCSS

What's hot (19)

HTML Table Tags
HTML Table TagsHTML Table Tags
HTML Table Tags
 
Handout5 tables
Handout5 tablesHandout5 tables
Handout5 tables
 
html-table
html-tablehtml-table
html-table
 
Html tables
Html tablesHtml tables
Html tables
 
Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTML
 
Images and Tables in HTML
Images and Tables in HTMLImages and Tables in HTML
Images and Tables in HTML
 
Web forms and html lecture Number 3
Web forms and html lecture Number 3Web forms and html lecture Number 3
Web forms and html lecture Number 3
 
Web topic 12 tables in html
Web topic 12  tables in htmlWeb topic 12  tables in html
Web topic 12 tables in html
 
Computer language - Html tables
Computer language - Html tablesComputer language - Html tables
Computer language - Html tables
 
Frames tables forms
Frames tables formsFrames tables forms
Frames tables forms
 
Bootstrap cheatsheet
Bootstrap cheatsheetBootstrap cheatsheet
Bootstrap cheatsheet
 
Chapter 8: Tables
Chapter 8: TablesChapter 8: Tables
Chapter 8: Tables
 
Css tables
Css tablesCss tables
Css tables
 
Html introduction Part-2
Html introduction Part-2Html introduction Part-2
Html introduction Part-2
 
HTML Tutorials
HTML TutorialsHTML Tutorials
HTML Tutorials
 
HTML Dasar : #9 Tabel
HTML Dasar : #9 TabelHTML Dasar : #9 Tabel
HTML Dasar : #9 Tabel
 
Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)
 
Lecture3
Lecture3Lecture3
Lecture3
 
CSS
CSSCSS
CSS
 

Similar to HTML Tables in Omeka

Web I - 03 - Tables
Web I - 03 - TablesWeb I - 03 - Tables
Web I - 03 - Tables
Randy Connolly
 
Table structure introduction
Table structure introductionTable structure introduction
Table structure introduction
nobel mujuji
 
HTML Tables.ppt
HTML Tables.pptHTML Tables.ppt
HTML Tables.ppt
ShararehShojaei1
 
WEP4 and 5.pptx
WEP4 and 5.pptxWEP4 and 5.pptx
WEP4 and 5.pptx
MLikithMahendra
 
Lecture 2.ppt
Lecture 2.pptLecture 2.ppt
Lecture 2.ppt
MuhammadRehan856177
 
2. HTML Tables.ppt
2. HTML Tables.ppt2. HTML Tables.ppt
2. HTML Tables.ppt
MuhammadRehan856177
 
Response Tables.ppt
Response Tables.pptResponse Tables.ppt
Response Tables.ppt
Muhammad Rehan
 
Session on common html table
Session on common html tableSession on common html table
Session on common html table
Rahul Kumar
 
Html tables
Html tablesHtml tables
Html tables
Himanshu Pathak
 
Tables
TablesTables
Tables
savitamhaske
 
Chapter 4 class presentation
Chapter 4 class presentationChapter 4 class presentation
Chapter 4 class presentation
cmurphysvhs
 
Chapter 4 class presentation
Chapter 4 class presentationChapter 4 class presentation
Chapter 4 class presentationcmurphysvhs
 
Static web sites assignment 1 philip lemmon1
Static web sites assignment 1 philip lemmon1Static web sites assignment 1 philip lemmon1
Static web sites assignment 1 philip lemmon1Lemmon12
 
Html_Day_Three(W3Schools)
Html_Day_Three(W3Schools)Html_Day_Three(W3Schools)
Html_Day_Three(W3Schools)
Rafi Haidari
 
Html tables
Html tablesHtml tables
Working With Tables in HTML
Working With Tables in HTMLWorking With Tables in HTML
Working With Tables in HTML
Shehzad Yaqoob
 
Html web designing using tables
Html web designing using tablesHtml web designing using tables
Html web designing using tables
Jesus Obenita Jr.
 
TABLE
TABLETABLE
HTML
HTMLHTML

Similar to HTML Tables in Omeka (20)

Web I - 03 - Tables
Web I - 03 - TablesWeb I - 03 - Tables
Web I - 03 - Tables
 
Table structure introduction
Table structure introductionTable structure introduction
Table structure introduction
 
HTML Tables.ppt
HTML Tables.pptHTML Tables.ppt
HTML Tables.ppt
 
WEP4 and 5.pptx
WEP4 and 5.pptxWEP4 and 5.pptx
WEP4 and 5.pptx
 
Lecture 2.ppt
Lecture 2.pptLecture 2.ppt
Lecture 2.ppt
 
2. HTML Tables.ppt
2. HTML Tables.ppt2. HTML Tables.ppt
2. HTML Tables.ppt
 
Response Tables.ppt
Response Tables.pptResponse Tables.ppt
Response Tables.ppt
 
Session on common html table
Session on common html tableSession on common html table
Session on common html table
 
Html tables
Html tablesHtml tables
Html tables
 
Tables
TablesTables
Tables
 
Chapter 4 class presentation
Chapter 4 class presentationChapter 4 class presentation
Chapter 4 class presentation
 
Chapter 4 class presentation
Chapter 4 class presentationChapter 4 class presentation
Chapter 4 class presentation
 
Static web sites assignment 1 philip lemmon1
Static web sites assignment 1 philip lemmon1Static web sites assignment 1 philip lemmon1
Static web sites assignment 1 philip lemmon1
 
Html_Day_Three(W3Schools)
Html_Day_Three(W3Schools)Html_Day_Three(W3Schools)
Html_Day_Three(W3Schools)
 
Html tables
Html tablesHtml tables
Html tables
 
belajar HTML 3
belajar HTML 3belajar HTML 3
belajar HTML 3
 
Working With Tables in HTML
Working With Tables in HTMLWorking With Tables in HTML
Working With Tables in HTML
 
Html web designing using tables
Html web designing using tablesHtml web designing using tables
Html web designing using tables
 
TABLE
TABLETABLE
TABLE
 
HTML
HTMLHTML
HTML
 

Recently uploaded

From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 

Recently uploaded (20)

From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 

HTML Tables in Omeka

  • 1. HTML tables; or, Handy tips for organizing information in your Omeka exhibition These slides were originally created by Brenna Bychowski for a presentation at AAS in February 2016.
  • 2. Why tables? Tables provide an effective, simple, and sometimes invisible method of organizing a web page. They allow you to keep information separate (or together), while keeping various elements consistently relative to each other. Tables are surprisingly flexible, and they provide many layout and organizing options for your pages. Tables are created using HTML coding directly in your simple page or exhibit page, and they can be customized individually in the HTML or all at once in the CSS.
  • 3. HTML Refresher Like all HTML, tables are created using opening and closing tags. Tags are enclosed in angle brackets <> and closing tags are preceded in the brackets by a forward slash /. <b>This text is bold.</b> This text is bold. <i>This text is in italics.</i> This text is in italics. Tags can be nested, creating multiple effects at once. Notice that tags are closed in reverse order from being opened. E.g. <b><i></i></b>. NOT <b><i></b></i> <b><i>This text is bold and in italics.</i></b> This text is bold and in italics.
  • 4. Basic Table Tags The following are the standard tags for creating a table: • <table> o Defines the beginning and end of the table . • <tr> o Defines a table row. This is repeatable within <table> to create as many rows as you would like. • <td> o Defines a cell within a table row. Rows within a single table should contain a consistent number of cells. The cells line up to create table columns. Example: <table> <tr> <td>This is row 1, cell 1.</td> <td>This is row 1, cell 2.</td> <td>This is row 1, cell 3.</td> </tr> <tr> <td>This is row 2, cell 1.</td> <td>This is row 2, cell 2.</td> <td>This is row 2, cell 3.</td> </tr> </table> This code creates a table with two rows, with each row containing three cells.
  • 5. Customizing Tables with HTML Within the opening table tag <table>, you can add elements to customize to look and format of your table. Some options: • align o Justifies the table left, center, or right. • width o Defines table width. • border o Defines thickness of the table border. If you are only using tables to format your page, not to look like tables, set the border to 0. • cellpadding o This allows you to space out the cells relative to each other. Example: <table align="center" width="50%" border="0" cellpadding="5"> <tr> <td>This is row 1, cell 1.</td> <td>This is row 1, cell 2.</td> <td>This is row 1, cell 3.</td> </tr> <tr> <td>This is row 2, cell 1.</td> <td>This is row 2, cell 2.</td> <td>This is row 2, cell 3.</td> </tr> </table> This table will be centered in the page it’s on, it will be 50% of the width of the page it’s on, and it will have no border.
  • 6. Further Customization Style • The style element can be used in many HTML tags, but for our purposes it can be used in the table tag <table>, the table row tag <tr>, and the table data <td> tag • The style element allows you to customize the look of the table • The style element can be filled with CSS properties and values, such as o color o font o text-align o background-color o border-color • Used in <table>, it affects the whole table. Used in <tr>, it affects that row. Used in <td>, it affects only that cell. Examples (using only opening tags): <table style="border-color:pink"> This table will have a pink border <td style="text-align:center"> All text in this cell will be centered <tr style="background-color:gray"> <tr style="background-color:white"> <tr style="background-color:gray"> The rows in this table will have alternating background colors of gray and white
  • 7. Customizing in CSS This is not the place to get into the deep dark recesses of CSS, but if you want to modify or format multiple tables at once in the same way, CSS is the best place to do it. This creates uniformity without having to fiddle with the code of multiple tables. You can adjust <table>, <tr>, and <td> in the CSS, individually or in groups. You can also specify in the CSS special formatting for elements (such as images or links) only when they appear in tables. There are also some style and customization changes that can only be done via CSS and not HTML. Examples (using only opening tags): table h1 { text-variant:small-caps } All text tagged h1 in tables will appear in small caps td a:link { font-style:italic } All unclicked links in table cells will be italicized #home table img:hover { opacity:.5 } This is actual CSS from my Omeka exhibition. The images in the table on my home page will fade to 50% opacity when the cursor hovers over them.
  • 8. Adding Other HTML Any standard HTML tags can be used within a table cell to define the data in the cells. HTML: <table> <tr> <td><i>Cell 1.</i></td> <td><b>Cell 2.</b></td> <td>Cell 3.</td> </tr> <tr> <td>Cell 1.</td> <td><i>Cell 2.</i></td> <td><b>Cell 3.</b></td> </tr> <tr> <td><b>Cell 1.</b></td> <td>Cell 2.</td> <td><i>Cell 3.</i></td> </tr> </table> Cell 1 Cell 2 Cell 3 Cell 1 Cell 2 Cell 3 Cell 1 Cell 2 Cell 3 Resulting table:
  • 9. Look! More Tables! Tables can also be nested inside each other, for more granular organizing. Example: <table border="0"> <tr> <td><center><img src="dimenovelcover.jpg." width="75%"></td> </tr> <tr> <td> <table border="0"><tr> <td><h3>Cedar Swamp; or, Wild Nat’s Brigade</h3></td> <td><p><i>Cedar Swamp</i> is a dime novel. Dime novels are awesome.</p></td> </tr></table> </td> </tr> </table> I’ve indented the second table in the above HTML for clarity. Cedar Swamp; or, Wild Nat's Brigade Cedar Swamp is a dime novel. Dime novels are awesome. Resulting table:
  • 10. Additional Tips & Tricks • Sometimes, you need a cell in your table for formatting reasons, but you want it to be empty. The easiest way to do this is to use the following: <td>&nbsp;</td>. &nbsp; is HTML code for a non-breaking space, but for our purposes creates an empty cell. • It's generally best to compose your text outside of the Omeka editor, and then copy and paste it in, and this is also true for any HTML work. However, I strongly recommend NOT using a standard word processor to code HTML, as word processors use special characters and coding that will cause problems with your HTML code. It's best to use a generic text editor like Notebook, or the more specialized Notebook++ (which is great for editing HTML).
  • 11. Table References Basic HTML coding http://www.w3schools.com/html/html_tables.asp Gives a good overview of the various HTML elements for creating and customizing tables, including elements not discussed in this presentation Basic CSS coding http://www.w3schools.com/css/css_table.asp Goes in-depth into the various customizations you can make to tables using CSS. It can get pretty fancy, but it's all relatively straightforward and definitely fun to play around with, if you're comfortable with CSS