HTML <th> char Attribute
Last Updated :
30 Jan, 2022
The HTML <th> char attribute is used to specify the alignment to the character of content in a table header cell. It only contains the char align attribute. Its default value is a decimal point for page language.
Note: It is not supported by HTML5.
Syntax:
<th char="character">
Attribute Values:
- character: It is used to specify the character to align the content inside the header cell.
Example:
HTML
<!DOCTYPE html>
< html >
< head >
< title >HTML th char attribute</ title >
< style >
body {
text-align: center;
}
h1,h2 {
color: green;
}
th {
color: blue;
}
table,
tbody,
td {
border: 1px solid black;
border-collapse: collapse;
}
</ style >
</ head >
< body >
< center >
< h1 >GeeksforGeeks</ h1 >
< h2 > HTML th char Attribute</ h2 >
< table >
< thead >
< tr align = "char" charoff = "." >
< th align = "char" char = "." >
Country_name
</ th >
< th >Total Medals</ th >
</ tr >
</ thead >
< tbody >
< tr >
< td >China</ td >
< td >34</ td >
</ tr >
< tr >
< td >India</ td >
< td >45</ td >
</ tr >
</ tbody >
</ table >
</ center >
</ body >
</ html >
|
Output:
Supported Browsers: It is not supported by any browsers.
Share your thoughts in the comments
Please Login to comment...