Home  >  Article  >  Web Front-end  >  How to cancel td border in Html5

How to cancel td border in Html5

青灯夜游
青灯夜游Original
2022-05-18 18:57:185670browse

3 ways to cancel: 1. Add the "border:none" borderless style to the td element, with the syntax "td{border:none}". 2. Add the "border:0" style to the td element, the syntax is "td{border:0;}", and set the width of the td border to 0. 3. Add the "border:transparent" style to the td element, with the syntax "td{border:transparent;}", and set the color of the td border to transparent.

How to cancel td border in Html5

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

tags define standard cells in HTML tables. The text within the td element is normal left-aligned text.
<table border="1">
	<tr>
		<th>商品</th>
		<th>价格</th>
	</tr>
	<tr>
		<td>T恤</td>
		<td>¥100</td>
	</tr>
	<tr>
		<td>牛仔褂</td>
		<td>¥250</td>
	</tr>
	<tr>
		<td>牛仔库</td>
		<td>¥150</td>
	</tr>
</table>

How to cancel td border in Html5

So how to cancel the td border in Html5? Here are several methods.

1. Add the "border:none;" style to the td element

The border attribute sets all border attributes. When the value is none, it means that the label element is not Set the border attribute or cancel the border attribute to define a borderless style.

<style>
	td{
		border:none;
	}
</style>

How to cancel td border in Html5

2. Add the "border:0;" style to the td element

By setting the width of the border to 0 Remove

<style>
	td{
		border:0;
	}
</style>

How to cancel td border in Html5

3. Add the "border:transparent;" style to the td element

by setting the border style to transparent Color to remove

<style>
	td{
		border:transparent;
	}
</style>

How to cancel td border in Html5

(Learning video sharing: html video tutorial, css video tutorial, web front-end)

The above is the detailed content of How to cancel td border in Html5. 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:Can odd be used in CSS?Next article:Can odd be used in CSS?