"; 2. Use the style attribute to add the "display:none" style to the td tag with the syntax "”."/> "; 2. Use the style attribute to add the "display:none" style to the td tag with the syntax "”.">

Home >Web Front-end >HTML Tutorial >How to hide td tag in html

How to hide td tag in html

青灯夜游
青灯夜游Original
2021-11-18 15:33:168256browse

Methods to hide the td tag: 1. Set the hidden attribute to the td tag with the syntax "

"; 2. Use the style attribute to add the "display:none" style to the td tag. , the syntax is " ".

How to hide td tag in html

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

There is such a form:

<table border="1">
	<tr>
		<th>姓名</th>
		<th>年龄</th>
	</tr>
	<tr>
		<td>Peter</td>
		<td>20</td>
	</tr>
	<tr>
		<td>Lois</td>
		<td>20</td>
	</tr>
</table>

How to hide td tag in html

How to hide the td tag in HTML? Let me introduce the method below:

Method 1: Set the hidden attribute to the td tag

<table border="1">
	<tr>
		<th>姓名</th>
		<th>年龄</th>
	</tr>
	<tr>
		<td>Peter</td>
		<td hidden="hidden">20</td>
	</tr>
	<tr>
		<td>Lois</td>
		<td>20</td>
	</tr>
</table>

How to hide td tag in html

##Method 2: Use the style attribute to add the "display:none;" style to the td tag

<table border="1">
	<tr>
		<th>姓名</th>
		<th>年龄</th>
	</tr>
	<tr>
		<td>Peter</td>
		<td>20</td>
	</tr>
	<tr>
		<td>Lois</td>
		<td style="display: none;">20</td>
	</tr>
</table>

How to hide td tag in html

Recommended tutorial: "

html video tutorial"

The above is the detailed content of How to hide td tag in html. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to hide tags in html5Next article:How to hide tags in html5