How do I change the font size within table cells?


#1

Question

How do I change the font size within table cells?

Answer

To change the font size of the data contained within table cells you can use the td selector along with the font-size property within a .css file. For example, a CSS rule geared at changing the font size within all cells might look like this:

  td {
    font-size: 18px;
  }

To learn more about CSS, check out the “Learn CSS” course!


FAQ: Learn HTML Tables - Tables - Styling with CSS
#2

A post was split to a new topic: Setting font size for table data elements