Home > Web Front-end > CSS Tutorial > How to adjust word spacing in css table

How to adjust word spacing in css table

WBOY
Release: 2021-12-03 11:52:55
Original
2881 people have browsed it

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.

How to adjust word spacing in css table

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>
Copy after login

Output result:

How to adjust word spacing in css table

(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!

Related labels:
css
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template