• Home
  • Cloud VPS
    • Hong Kong VPS
    • US VPS
  • Dedicated Servers
    • Hong Kong Servers
    • US Servers
    • Singapore Servers
    • Japan Servers
  • Company
    • Contact Us
    • Blog
logo logo
  • Home
  • Cloud VPS
    • Hong Kong VPS
    • US VPS
  • Dedicated Servers
    • Hong Kong Servers
    • US Servers
    • Singapore Servers
    • Japan Servers
  • Company
    • Contact Us
    • Blog
ENEN
  • 简体简体
  • 繁體繁體
Client Area

Css Basic: caption-side

December 20, 2023

CSS Basic: caption-side

In CSS, the caption-side property is used to specify the placement of a table caption. The caption is a text description that provides additional information about the table’s content. By default, the caption is placed above the table, but with the caption-side property, you can change its position to either the top or bottom of the table.

Syntax

The syntax for the caption-side property is as follows:

caption-side: top|bottom|initial|inherit;

The values for the caption-side property are:

  • top: Places the caption above the table.
  • bottom: Places the caption below the table.
  • initial: Sets the property to its default value.
  • inherit: Inherits the property from its parent element.

Example

Let’s consider the following HTML code:

<table>
  <caption>This is a table caption</caption>
  <tr>
    <th>Header 1</th>
    <th>Header 2</th>
  </tr>
  <tr>
    <td>Data 1</td>
    <td>Data 2</td>
  </tr>
</table>

To place the caption below the table, you can use the following CSS:

caption {
  caption-side: bottom;
}

With this CSS, the caption will be displayed at the bottom of the table:

This is a table caption
Header 1Header 2
Data 1Data 2

Summary

The caption-side property in CSS allows you to control the placement of a table caption. By default, the caption is positioned above the table, but with the caption-side property, you can change it to be either at the top or bottom of the table. This property provides flexibility in designing and styling tables, allowing you to present information in a visually appealing manner.

If you are looking for reliable VPS hosting solutions in the Hong Kong, consider Server.HK. With our top-notch VPS services, you can ensure high performance and stability for your website or application.

Recent Posts

  • How to Choose the Right Hong Kong VPS Plan: A Buyer’s Guide for 2026
  • CN2 GIA vs BGP vs CN2 GT: What’s the Real Difference for China Connectivity?
  • Top 5 Use Cases for a Hong Kong Dedicated Server in 2026
  • Hong Kong VPS vs Japan VPS: Head-to-Head for Asia-Pacific Deployments in 2026
  • Hong Kong VPS vs Singapore VPS: Which Is Better for Your Asia Business in 2026?

Recent Comments

No comments to show.

Knowledge Base

Access detailed guides, tutorials, and resources.

Live Chat

Get instant help 24/7 from our support team.

Send Ticket

Our team typically responds within 10 minutes.

logo
Alipay Cc-paypal Cc-stripe Cc-visa Cc-mastercard Bitcoin
Cloud VPS
  • Hong Kong VPS
  • US VPS
Dedicated Servers
  • Hong Kong Servers
  • US Servers
  • Singapore Servers
  • Japan Servers
More
  • Contact Us
  • Blog
  • Legal
© 2026 Server.HK | Hosting Limited, Hong Kong | Company Registration No. 77008912
Telegram
Telegram @ServerHKBot