What is the TD tag in HTML
Syntax
Syntax of HTML <dl> tag
<dl>
..
.
</dl>
What is the TD tag in HTML
Example
<!DOCTYPE html>
<html>
<head>
<title> html td tag </title>
<style>
table,th,td{
border:1px solid black;
}
</style>
</head>
<body>
<h2>HTML td Tag </h2>
<table>
<tr>
<td>HTML</td>
<td>PHP</td>
</tr>
<tr>
<td>C</td>
<td>JavaScript</td>
</tr>
</table>
</body>
</html>
What is the TD tag in HTML
Explain Program
Step 1]
<!DOCTYPE html>
- This declare the document type.
- browser that the document is written in html
Step 2 ]
<html>.... . </html>
- html is the root element of the html page.
- Every thing inside it is part of the webpage.
Step 3]
<head>
<title> html td tag </title>
- <head> contains metadata webpage resources.
- <title> title tag webpage browser tab.
<style>
table,th,td{
border:1px solid black;
}
</style>
HTML code Apply the Style <table>,<th>,<td>.
1px solid black color
CSS applies
- <style> Tag
- <style> tag use to include CSS (Cascading Style Sheets) directly within HTML Document .
- Inside the <head> Section html.
<style>
.
.
.
</style>
CSS code defines HTML element
<body>.....</body>
- <body> tag contains all the visible content of the page.
- inside <body> show the browser screen.
Step 4]
<body>
<h2>HTML td Tag </h2>
- <body> contains data visible of your webpage.
- <h2> 2-level heading displaying HTML TD TAG on page.
Step 5]
<table>
<tr>
<td>HTML</td>
<td>PHP</td>
</tr>
<tr>
<td>C</td>
<td>JavaScript</td>
</tr>
</table>
- <table> creates table on the webpage.
- <tr> tag -> tr tag define a table row.
- <td> tag -> td tag define table cell (Data call) within row.
- first row contains 2- cell HTML & PHP.
- Second row Contains 2- cell C & JavaScript
Step 6]
closing the Tag
</table>
</body>
</html>
