HTML5 & lt; details & gt; tag

Source: Internet
Author: User
Tags jquery accordion

HTML5 <details> labels
The <details> tag added in HTML5 allows you to create an expandable and foldable component, so that a text or title contains some hidden information. In general, details is used to explain the content displayed on the page. The effect is similar to that of the jQuery accordion plug-in. <Details> <summary> Google Nexus 6 </summary> <p> product details: </p> <dl> <dt> screen </dt> <dd> 5.96 "2560x1440 qhd amoled display (493 ppi) </dd> <dt> battery </dt> <dd> 3220 mAh </dd> <dt> camera </dt> <dd> 13MP rear-facing with optical image stabilization 2MP front-facing </dd> <dt> processor </dt> <dd> Qualcomm®Snapdragon™805 processor </dd> </dl> </details> first, the <details> label, followed by the title <summary>. The content here is generally brief and summative, will be displayed on the page. Then, you can use any type of HTML elements as the details. These content must be displayed after you click <summary>. The result of the code above is as follows: the initial details of the html5 details tag are hidden and displayed when clicked. Of course, you can also set the open attribute for the <details> label to show the attribute by default. <Details open> <summary> Google Nexus 6 </summary> <p> product details: </p> <dl> <dt> screen </dt> <dd> 5.96 "2560x1440 qhd amoled display (493 ppi) </dd> <dt> battery </dt> <dd> 3220 mAh </dd> <dt> camera </dt> <dd> 13MP rear-facing with optical image stabilization 2MP front-facing </dd> <dt> processor </dt> <dd> Qualcomm®Snapdragon™805 processor </dd> </dl> </details> by default, details are displayed and collapsed after you click the title.

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.