What Is The Element In HTML?
Home » What Is Th In Html
» What Is The
Element In HTML?
Maybe your like
ExploreEXPLORE THE CATALOGSupercharge your career with 700+ hands-on coursesView All CoursesPythonJavaJavaScriptCReactDockerVue JSRWeb DevDevOpsAWSC#LEARNING TOOLSExplore the industry's most complete learning platformCoursesLevel up your skillsSkill PathsAchieve learning goalsProjectsBuild real-world applicationsMock InterviewsNewAI-Powered interviewsPersonalized PathsGet the right resources for your goalsLEARN TO CODECheck out our beginner friendly courses.PricingFor BusinessResourcesNewsletterCurated insights on AI, Cloud & System DesignBlogFor developers, By developersFree CheatsheetsDownload handy guides for tech topicsAnswersTrusted answers to developer questionsGamesSharpen your skills with daily challengesSearchCoursesLog InJoin for freeWhat is the <th> element in HTML?The <th> tag stands for table heading. It is used to define a single data cell in the HTML table. The text in a cell defined by the <th> tag is bold and center-aligned.
The <table> tag is used to create a table. The <tr> tag is used to create a row in the header, body, or footer.
The <th> tag is used in the <tr> tag to define a single cell that will contain a heading. The <th> tag is mostly used in cells in the first row or first column.
Syntax
<th> Heading1 </th> The above snippet of code describes how to write the <th> tag in HTML. We begin by opening the tags using the <> symbol. We then close the tags using the </> symbol. Once again, we will place the name of our tag in-between <> and after the / symbol.
Attributes
We can use attributes with the <th> tag. The most commonly used attribute with the <th> tag is scope.
The scope attribute defines if the heading in the cell is for a row or a column.
If the heading is for a row, the scope is defined as:
<th scope="row">Heading 1</th> If the heading is for a column, the scope is defined as:
<th scope="col">Heading 1</th> More attributes used with the <th> tag can be found here.
Example
- HTML
RunThe above example depicts the usage of the <th> tag.
In the above snippet, the header and the body are defined using the <thead> and <tbody> tags.
There is a single row in the header, and each cell of this row is a heading cell with scope="col". The scope is set to column because this row acts as a heading for all the rows below it.
In the body, there are two rows. Each row is defined using the <tr> tag.
Each row is divided into four cells. First, a heading cell is defined by the <th> tag with scope="row". The scope is set to row because it acts as a heading for all the values towards the right of it.
Then there are three standard data cells defined by the <td> tag. The entire row is divided according to the number of <td> or <th> cells used inside the <tr> tag.
Relevant Answers
Explore Courses
Free Resources
Copyright ©2026 Educative, Inc. All rights reserved
Tag » What Is Th In Html
-
HTML Th Tag - W3Schools
-
: The Table Header Element - HTML - MDN Web Docs - Mozilla
-
HTML: Tag - TechOnTheNet
-
HTML 태그 - 코딩의 시작, TCP School
-
HTML Th Tag - GeeksforGeeks
-
HTML - Tag - Tutorialspoint
-
HTML Th Tag - Javatpoint
-
HTML Th Tag - Learn HTML | W3Docs
-
Table Cells (TH And TD)
-
HTML Tag »
-
HTML Tag - Computer Hope
-
HTML Th Class Attribute - Dofactory
-
HTML Th Style Attribute - Dofactory
-
HTML Th Tag And Element - HTML Tutorials - W3resource
Contact
TRUYỀN HÌNH CÁP SÔNG THU ĐÀ NẴNG
Address: 58 Hàm Nghi - Đà Nẵng
Facebook: https://fb.com/truyenhinhcapsongthu/
Twitter: @ Capsongthu
Copyright © 2022 | Designer Truyền Hình Cáp Sông Thu
Home » What Is Th In Html » What Is The
Maybe your like
The <th> tag stands for table heading. It is used to define a single data cell in the HTML table. The text in a cell defined by the <th> tag is bold and center-aligned.
The <table> tag is used to create a table. The <tr> tag is used to create a row in the header, body, or footer.
The <th> tag is used in the <tr> tag to define a single cell that will contain a heading. The <th> tag is mostly used in cells in the first row or first column.
Syntax
<th> Heading1 </th>The above snippet of code describes how to write the <th> tag in HTML. We begin by opening the tags using the <> symbol. We then close the tags using the </> symbol. Once again, we will place the name of our tag in-between <> and after the / symbol.
Attributes
We can use attributes with the <th> tag. The most commonly used attribute with the <th> tag is scope.
The scope attribute defines if the heading in the cell is for a row or a column.
If the heading is for a row, the scope is defined as:
<th scope="row">Heading 1</th>If the heading is for a column, the scope is defined as:
<th scope="col">Heading 1</th>More attributes used with the <th> tag can be found here.
Example
- HTML
The above example depicts the usage of the <th> tag.
In the above snippet, the header and the body are defined using the <thead> and <tbody> tags.
There is a single row in the header, and each cell of this row is a heading cell with scope="col". The scope is set to column because this row acts as a heading for all the rows below it.
In the body, there are two rows. Each row is defined using the <tr> tag.
Each row is divided into four cells. First, a heading cell is defined by the <th> tag with scope="row". The scope is set to row because it acts as a heading for all the values towards the right of it.
Then there are three standard data cells defined by the <td> tag. The entire row is divided according to the number of <td> or <th> cells used inside the <tr> tag.
Relevant Answers
Explore Courses
Free Resources
Copyright ©2026 Educative, Inc. All rights reservedTag » What Is Th In Html
-
HTML Th Tag - W3Schools
-
: The Table Header Element - HTML - MDN Web Docs - Mozilla HTML:
Tag - TechOnTheNet HTML
태그 - 코딩의 시작, TCP School HTML Th Tag - GeeksforGeeks
HTML -
Tag - Tutorialspoint HTML Th Tag - Javatpoint
HTML Th Tag - Learn HTML | W3Docs
Table Cells (TH And TD)
HTML Tag » HTML
Tag - Computer Hope HTML Th Class Attribute - Dofactory
HTML Th Style Attribute - Dofactory
HTML Th Tag And Element - HTML Tutorials - W3resource
Contact
TRUYỀN HÌNH CÁP SÔNG THU ĐÀ NẴNG
Address: 58 Hàm Nghi - Đà Nẵng
Facebook: https://fb.com/truyenhinhcapsongthu/
Twitter: @ Capsongthu
Copyright © 2022 | Designer Truyền Hình Cáp Sông Thu