HTML 提供了多種選項來表示結構化和非結構化資料。它允許我們在段落、有序列表、無序列表、表格等中呈現資料。在本主題中,我們將學習 HTML tr 標籤。
建立 HTML 表格,在表格標籤
中顯示的資料儲存格。 … | 標籤(如果它是標準資料單元格或在中) … | 如果它是標題單元格,則標記。
---|
… | …. |
---|
讓我們回顧一下下面的範例:
範例:
<title>This is a table example</title> <style> th, td { padding : 10px; border : 1px solid #666; } </style>
Sr. No. | Popular programming languages | Description |
---|---|---|
1 | Java | Java has been holding position 1 or 2 for the world’s most popular languages since it’s inception. It was created in mid 90s and since then many large and small companies have adopted it for developing desktop and web applications |
2 | C | C is a popular language for cars, sensors and embedded systems. It has been one of the top most popular languages mainly due to its universal compatibility |
3 | Python | Python is very popular in today’s era specially since it support quick development of application based on machine learning, big data and AI. |
如您所見,我們使用 上面的範例在瀏覽器中查看時為我們提供了以下輸出: 為了進一步自訂 使用align屬性,我們可以自訂 但是,HTML 5 不支援此屬性。 我們可以使用 style 標籤中的 background 屬性來設定行的背景。讓我們看一下下面的範例。 代碼: 上述程式碼在瀏覽器視窗中的輸出如下,其中第一行的背景顏色已變更為綠色: 我們可以透過使用 tr 標籤中的 color 屬性來操作箭頭中文字的顏色。讓我們將其中一行的字體顏色改為灰色。 代碼: 上述程式碼在瀏覽器視窗中的輸出如下所示,我們可以發現套用於表格第一行的字體顏色: 如上所示,我們可以使用 HTML 表和 tr 元素來定義和表示結構化資料。我們可以自訂同一個表中的不同行來更改行的樣式。我們也可以使用 th 和 td 來定義表頭和標準表資料。我們可以進一步自訂一行的字體顏色、字體大小、字體家族、字體裝飾和背景顏色。 中表示的資料相比,它們具有粗體外觀。標籤,具有標準外觀。
HTML tr 標籤的屬性
中呈現的資料;元素,我們可以在
中使用以下屬性:標籤:
1.對齊
中的文字對齊方式。標籤。它可以使用以下值。
2.背景
<title>This is a table example</title>
<style>
th, td {
padding : 10px;
border : 1px solid #666;
}
</style>
Sr. No.
Popular programming languages
Description
// here we are setting the back ground color to #00ff3787
1
Java
Java has been holding position 1 or 2 for the world’s most popular languages since it’s inception. It was created in mid 90s and since then many large and small companies have adopted it for developing desktop and web applications
2
C
C is a popular language for cars, sensors and embedded systems. It has been one of the top most popular languages mainly due to its universal compatibility
3
Python
Python is very popular in today’s era specially since it support quick development of application based on machine learning, big data and AI.
3.顏色
<title>This is an example of HTML table</title>
<style>
th, td {
padding : 10px;
border : 1px solid #666;
}
</style>
Sr. No.
Popular programming languages in 2019
Description
// here we are setting the font color to grey
1
Java
Java has been holding position 1 or 2 for the world’s most popular languages since it’s inception. It was created in mid 90s and since then many large and small companies have adopted it for developing desktop and web applications
2
C
C is a popular language for cars, sensors and embedded systems. It has been one of the top most popular languages mainly due to its universal compatibility
3
Python
Python is very popular in today’s era specially since it support quick development of application based on machine learning, big data and AI.
結論
以上是HTML 標籤的詳細內容。更多資訊請關注PHP中文網其他相關文章!

HTMLtagsdefinethestructureofawebpage,whileattributesaddfunctionalityanddetails.1)Tagslike,,andoutlinethecontent'splacement.2)Attributessuchassrc,class,andstyleenhancetagsbyspecifyingimagesources,styling,andmore,improvingfunctionalityandappearance.

HTML的未來將朝著更加語義化、功能化和模塊化的方向發展。 1)語義化將使標籤更明確地描述內容,提升SEO和無障礙訪問。 2)功能化將引入新元素和屬性,滿足用戶需求。 3)模塊化將支持組件化開發,提高代碼復用性。

htmlattributesarecrucialinwebdevelopment forcontrollingBehavior,外觀和功能

alt屬性是HTML中標籤的重要部分,用於提供圖片的替代文本。 1.當圖片無法加載時,alt屬性中的文本會顯示,提升用戶體驗。 2.屏幕閱讀器使用alt屬性幫助視障用戶理解圖片內容。 3.搜索引擎索引alt屬性中的文本,提高網頁的SEO排名。

HTML、CSS和JavaScript在網頁開發中的作用分別是:1.HTML用於構建網頁結構;2.CSS用於美化網頁外觀;3.JavaScript用於實現動態交互。通過標籤、樣式和腳本,這三者共同構築了現代網頁的核心功能。

設置標籤的lang屬性是優化網頁可訪問性和SEO的關鍵步驟。 1)在標籤中設置lang屬性,如。 2)在多語言內容中,為不同語言部分設置lang屬性,如。 3)使用符合ISO639-1標準的語言代碼,如"en"、"fr"、"zh"等。正確設置lang屬性可以提高網頁的可訪問性和搜索引擎排名。

htmlattributeseresene forenhancingwebelements'functionalityandAppearance.TheyAdDinformationTodeFineBehavior,外觀和互動,使網站互動,響應式,visalalyAppealing.AttributesLikutesLikeSlikEslikesrc,href,href,href,類,類型,類型,和dissabledtransfransformformformformformformformformformformformformformformforment

toCreateAlistInHtml,useforforunordedlistsandfororderedlists:1)forunorderedlists,wrapitemsinanduseforeachItem,RenderingeringAsabulletedList.2)fororderedlists,useandfornumberedlists,useandfornumberedlists,casundfornumberedlists,casundfornthetthetthetthetthetthetthetttributefordforderfordforderforderentnumberingsnumberingsnumberingStys。


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

Dreamweaver Mac版
視覺化網頁開發工具

SublimeText3 英文版
推薦:為Win版本,支援程式碼提示!

ZendStudio 13.5.1 Mac
強大的PHP整合開發環境

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具