Creating a Web Site, pages 234-236

Version 1

This is a plain table with no embellishments.

City 2022
Population
2020
Census
Change
Manchester 116860 109565 6.66
Nashua 92288 86494 6.70
Concord 44232 42695 3.60
Dover 33291 29987 11.02
Rochester 33040 29752 11.05

Version 2

This table has a border attribute with a value of 2 pixels.

City 2022
Population
2020
Census
Change
Manchester 116860 109565 6.66
Nashua 92288 86494 6.70
Concord 44232 42695 3.60
Dover 33291 29987 11.02
Rochester 33040 29752 11.05

Version 3

This version adds a cellspacing attribute with a value of 10 pixels.

City 2022
Population
2020
Census
Change
Manchester 116860 109565 6.66
Nashua 92288 86494 6.70
Concord 44232 42695 3.60
Dover 33291 29987 11.02
Rochester 33040 29752 11.05

Version 4

This version adds a cellpadding attribute with a value of 5 pixels.

City 2022
Population
2020
Census
Change
Manchester 116860 109565 6.66
Nashua 92288 86494 6.70
Concord 44232 42695 3.60
Dover 33291 29987 11.02
Rochester 33040 29752 11.05

Version 5

This version adds attribute style='text-align: right' to the td tags in the last three columns.

City 2022
Population
2020
Census
Change
Manchester 116860 109565 6.66
Nashua 92288 86494 6.70
Concord 44232 42695 3.60
Dover 33291 29987 11.02
Rochester 33040 29752 11.05

Version 6

This version adds commas to the values in the second and third columns just to make these numbers easier to read.

City 2022
Population
2020
Census
Change
Manchester 116,860 109,565 6.66
Nashua 92,288 86,494 6.70
Concord 44,232 42,695 3.60
Dover 33,291 29,987 11.02
Rochester 33,040 29,752 11.05

Version 7

This version demonstrates the use of CSS to make the table more attractive.

City 2022
Population
2020
Census
Change
Manchester 116,860 109,565 6.66
Nashua 92,288 86,494 6.70
Concord 44,232 42,695 3.60
Dover 33,291 29,987 11.02
Rochester 33,040 29,752 11.05

Version 8

This version demonstrates the use of the CSS nth-child property to make the table even more attractive.  (The background colors used here are PeachPuff and Aquamarine.

City 2022
Population
2020
Census
Change
Manchester 116860 109565 6.66
Nashua 92288 86494 6.70
Concord 44232 42695 3.60
Dover 33291 29987 11.02
Rochester 33040 29752 11.05