HTML Table Text

This page contains HTML table text code. This code enables you to format the text inside your HTML tables. For example, you can change the text color, size, style, alignment etc.

Example

In the following example, we use a CSS class to format the table text. We can use child selectors to format the table cells too if required.

In this example, we use the color property to define the text color. We use the font property to define the font weight, style, size, line height, and font family. We apply these properties to various HTML elements including the table, table header, table cells, as well as any hyperlinks within the table. And we use pseudo classes such as a:hover, a:active and a:visited to define the styles for the hyperlinks.

View Output

Using External Style Sheets

The above example uses embedded style sheets to set the CSS properties. This is because it's easier for demonstration purposes. I strongly encourage you to use an external style sheet whenever possible to set your styles. This can reduce coding time and make your code easier to maintain.