Home > Web Front-end > Front-end Q&A > How to hide text in html

How to hide text in html

藏色散人
Release: 2021-06-08 10:24:06
Original
6405 people have browsed it

htmlMethods to hide text: 1. Hide all text through the "display:none;" attribute; 2. Hide text that exceeds a certain boundary through the "overflow:hidden;" attribute.

How to hide text in html

The operating environment of this article: windows7 system, HTML5 version, DELL G3 computer

How to hide text in html?

1. If you want to hide all text, use:

<p style="display:none;">232342424</p>
Copy after login

2. If you want to hide text that exceeds a certain boundary, use:

<p style="display:block;overflow:hidden;width:100px;height:20px;border:1px red solid">12423122344444444444444444</p>
Copy after login

Recommended learning: " HTML video tutorial

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template