Home > Article > Web Front-end > How to adjust word spacing in css table
In CSS, you can use the "letter-spacing" attribute to set the word spacing of the table. The function of this attribute is to increase or decrease the spacing between characters. You only need to add "letter-spacing: spacing value" to the table element. ;" style is enough.
The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.
How to adjust the word spacing of tables in css
In css, you can use the letter-spacing attribute to adjust the word spacing of tables. The letter-spacing attribute Used to set the size of the word spacing.
Let’s take an example to see how to adjust the word spacing in tables. The example is as follows:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> </head> <body> <style> table{ letter-spacing:10px; } </style> <table border="1"> <tr> <th>好好学习</th> <th>天天向上</th> </tr> <tr> <td>福如东海</td> <td>寿比南山</td> </tr> </table> </body> </html>
Output result:
(Learning video Share: css video tutorial)
The above is the detailed content of How to adjust word spacing in css table. For more information, please follow other related articles on the PHP Chinese website!