Download presentation
Presentation is loading. Please wait.
Published byHubert Nicholas Daniel Modified over 9 years ago
1
HTML Overview Part 4 – Tables 1
2
HTML Tables Tables are defined with the tag pair. A table is divided into rows with tag pairs. o tr stands for "table row" Each row is divided into data cells with tag pairs. o td stands for "table data," and holds the content of a data cell. o A tag can contain text, links, images, lists, forms, other tables, etc.
3
Parts of a Table 3 table header : A cell with bold, centered text in the first row of the table. creates a table header
4
table row : defines the start and end of a table row 4
5
table cell : Each “box” in the table is called a cell. defines the start and end of a table cell 5
6
HTML Table Example 6 row 1, cell 1 row 1, cell 2 row 2, cell 1 row 2, cell 2
7
Table Attributes 7 The opening tag may also contain attributes for the table: specifies the thickness of the cell borders in pixels sets the amount of space between the cells in the table specifies the width of the table either in the number of pixels or as a percentage of the page width.
8
Table With Borders 8 If you do not specify a border attribute, the table will be displayed without borders. To display a table with borders, specify the border attribute: Row 1, cell 1 Row 1, cell 2
9
Tables Without Borders 9 This table has no borders: 100 200 300 400 500 600
10
Table Headers 10 Table headers: Name Telephone Bill Gates 555 77 854 555 77 855
11
Table With a Caption 11 Monthly savings Month Savings January $100 February $50
12
Cell Padding Use cellpadding to create more white space between the cell content and its borders. With cellpadding: First Row Second Row
13
Cell Spacing Use cellspacing to increase the distance between the cells. With cellspacing: First Row Second Row
14
Tags Inside a Table 14 This is a paragraph This is another paragraph This cell contains a table: A B C D
15
HTML Table Tags TagDescription Defines a table within the body of an HTML document. Defines a row within a table. Defines a data cell within a row in a table. Defines a cell within a table that displays with bold text – a header cell border=“value” Table attribute that specifies the thickness of the table borders in pixels cellpadding=“value” Table attribute that sets the amount of space between the cells in the table.
16
HTML Table Tags (cont.) TagDescription width=“value” Table attribute that specifies the width of the table either in the number of pixels or as a percentage of the page width. Defines a caption that appears above the table.
17
HTML Overview Part 4 – Hyperlinks 17
18
A hyperlink is is a word, group of words, or image that you can click on to jump to a new document. Hyperlinks are displayed in blue underlined text in the browser window. Visited hyperlinks are displayed in purple underlined text. The anchor tag tells the browser the text inside the tag is a hyperlink and. The href attribute sets the URL of the destination page. Link Text This text will display as the hyperlink on your page. 18
19
A hyperlink is is a word, group of words, or image that you can click on to jump to a new document. Hyperlinks are displayed in blue underlined text in the browser window. Visited hyperlinks are displayed in purple underlined text. The anchor tag tells the browser the text inside the tag is a hyperlink and. The href attribute sets the URL of the destination page. Link Text This is the URL of the destination site. 19
20
A hyperlink is is a word, group of words, or image that you can click on to jump to a new document. Hyperlinks are displayed in blue underlined text in the browser window. Visited hyperlinks are displayed in purple underlined text. The anchor tag tells the browser the text inside the tag is a hyperlink and. The href attribute sets the URL of the destination page. Link Text 20
21
HTML Links Example HTML Tutorial This is a link to a page on this website. Googl e This is a link to a website on the World Wide Web.
22
HTML Links Tags TagDescription Anchor tag – tells the browser the text inside the tag is a hyperlink href Attribute that sets the URL of the destination page.
23
Assignment 23 Work through the W3Schools HTML Tables tutorial http://www.w3schools.com/html/html_tables.asp and the HTML Hyperlinks tutorial http://www.w3schools.com/html/html_links.asp Complete Practice: Computer Viruses – part 3 of 5 Save your file as lastname_computer_viruses2
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.