![](/img/trans.png)
[英]How to edit markdown cell in jupyter-notebook ( Could not edit markdown cell in Jupyter notebook)
[英]How to aligne text in a table using HTML in a Jupyter Notebook markdown cell?
我想使用 HTML 代碼(在 jupyter notebook markdown 單元格中)將表格中的文本左對齊。
文本對齊不起作用。
這是單元格的樣子:在此處輸入圖像描述
這是我使用的代碼:
<table>
<tr style="font-size: 20px; font-weight: bold; text-align: center;">
<td>Header 1</td>
<td>Header 2</td>
</tr>
<tr style="font-size: 16px; text-align: right;">
<td>Cell 1</td>
<td>Cell 2</td>
</tr>
<tr style="font-size: 16px; text-align: right;">
<td>Cell 3</td>
<td>Cell 4</td>
</tr>
</table>
您嘗試使用文本對齊,請嘗試使用“ALIGN="center""
所以你的代碼應該看起來像這樣......
<table>
<tr style="font-size: 20px; font-weight: bold; text-align: center;">
<td>Header 1</td>
<td>Header 2</td>
</tr>
<tr style="font-size: 16px; text-align: right;">
<td ALIGN="center">Cell 1</td>
<td ALIGN="center">Cell 2</td>
</tr>
<tr style="font-size: 16px; text-align: right;">
<td ALIGN="center">Cell 3</td>
<td ALIGN="center">Cell 4</td>
</tr>
</table>
除非我誤解了你想要什么......
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.