📜  如何使用 CSS 将标题放在表格下方?

📅  最后修改于: 2021-09-01 03:40:39             🧑  作者: Mango

要将标题放在表格下方,我们可以使用 CSS 标题端属性。此属性用于指定放置表格标题的位置。它用于 HTML 表格。

此属性可用于显示属性设置为caption-side 的任何元素。此属性有多个参数,但我们被要求将标题放在表格下方,因此我们将使用一个参数值bottom

句法:

caption-side: bottom;

例子:

HTML
 
 
     
        caption-side property 
         
     
     
        
              

GeeksForGeeks

              

caption-side: bottom:

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
Table 4.1 Student Details
Student NameEnroll_no.Address
Hritik Bhatnagar234Delhi
Govind madan235kolkata
Suraj Roy236Mumbai
Dhruv Mishra237Dehadun
          
       


输出:

标题