Home > Article > Web Front-end > How to modify the font size of td element in table with css
In CSS, you can use the "font-size" attribute to modify the font size of the td element in the table. The function of this attribute is to set the font size of the element. You only need to add "font-size:" to the td element: Font size value;" style is enough.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
How to modify the font size of the td element in the table in css
In css, you can use the font-size attribute to set the size of the table text . The following example explains how to set the font size in the table with css.
The example is as follows:
1. Create a new html file, named test.html, to explain how to set the font size in the table with css. Create a form for testing. Set the class attribute of the table tag to lone.
2. In the css tag, define the style of the table through class and define its width as 250px. Use the font-size attribute to set the size of the table text to 30px.
Open the test.html file in the browser to check the effect.
Summary:
1. Create a table and set the class attribute of the table tag to lone.
2. In the css tag, define the style of the table through class and define its width as 250px.
3. In the css tag, use the font-size attribute to set the size of the table text to 30px.
4. Open the test.html file in the browser to check the effect.
(Learning video sharing: css video tutorial)
The above is the detailed content of How to modify the font size of td element in table with css. For more information, please follow other related articles on the PHP Chinese website!