Monday, May 9, 2011

Week 8 Tables

  Week ocho!! By this time we were moving closer and closer to our mid –semesters ad finals!! Week 8 is somewhat of a continuation from week seven as tables were touched on in this lecture.          
In order to work with tables, you need to start thinking in grids. Tables, just like spreadsheets, are made up of rows and columns. A table can be created in the XHTML/HTML by using the table element. Inside the table element the table is written out row by row. A row is contained inside a tr element which stands for table row. And each cell is then written inside the row element using a td element which stands for table data.  After getting an idea as to how to create and insert a table in the HTML, we then went on to the table elements and attributes. The table element is the containing element for all tables. It can carry the following attributes:

1.All of the universal attributes
2. Basic event attributes for scripting.

The Align Attribute - Although it is deprecated, the align attribute is still frequently used with tables. When used with the table element, it indicates whether the table should be aligned to the left (the default), right, or center of the page.

The bgcolor Attribute- The bgcolor attributes sets the background color for the table. The value of this attribute should be either a hex code or color name, as we learnt in week 5.

The Border Attribute -If you use the border attribute, a border will be created around both the table and each individual cell. The value for this attribute is the width you want the outside border of the table to be in pixels. If you give this attribute a value of 0, or if you do not use this attribute, then you should not get any borders.

The Cellpadding Attribute-The cellpadding attribute is used to create a gap between the edges of a cell and its contents. The value for this attribute can either be the amount of space or padding you want inside each wall of the cell in pixels or a percentage value as a percentage of the width of the table. 
Week 8 went on to speak about other attributes such as dir, width, cellspacing, frame, rules, summary, char, charoff, valign attributes etc…most if not all of these attributes are deprecated.

No comments:

Post a Comment