A detailed example of the syntax parameters of display attributes in CSS

Source: Internet
Author: User
Keywords Web page production CSS Tutorials
Tags block display example html set syntax text web

Here is a description of the HTML DOM display property definition and usage, the HTML DOM display property is used primarily to set how the element is displayed, such as when this property value is none, which means that the element is not displayed, and the block indicates that the element will be displayed as a chunk-level element. This element is preceded by a newline character.

HTML DOM Display property definition and usage

This property is primarily used to set how the element is displayed.

Syntax:

Object.style.display=value

Possible values

HTML DOM Display Property instance

This example sets the element to not be displayed:

<html> <head> <script type= "Text/javascript" >  function  Removeelement ()    {   document.getelementbyid ("P1"). style.display= "None";    }   </script>  </head>  <body>    <h1>hello</h1>  <p id= "P1" >this is some text. this  is some text. This is some text.  This is some  Text. this is some text. this is some text.  this is  some text. This is some text. This is some text.</p>    <input type= "button"  onclick= "Removeelement ()"  value= "Do not  Display paragraph " />   </body>  </html>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.