In this post, I’m to share my insights on how to add a tag that states ‘Expand To Read’. A few bloggers had asked me for it, and this is a post detailing the need and procedure for the same.
Details tag:
The details tag is more like an interactive disclosure widget. Any content that the user can open and close on demand can be added to this. When open, it expands and displays the content.
When to use the ‘details’ element?
Details tag in HTML can be used to display
- answers for Frequently Asked Questions (FAQs).
- repeated stuff, providing the reader a choice to read.
- spoilers in book or movie reviews.
- answers for puzzles.
- disclosures, or
- any trivial content.
When multiple details tag are added at a sequence as in FAQs, this expansion feature can be set such that the answer to previously opened question closes automatically when another answer is expanded. But, this can be done only by adding script code, which is not possible in the free plan of WordPress.
Summary tag:
The summary tag in HTML expounds a visible heading for the details element. The heading can be clicked to view or hide the details. It can be used only in conjunction with the details tag. By default, ‘Details’ is displayed as the heading that can be expanded. For those who have followed my previous posts, the text ‘Expand to read’ that I use, is put inside this tag.
Inserting Procedure:
- Choose the location where you want to add this tag.
- Place the cursor at the desired position and switch to Code/Text Editor (block mode / classic mode).
- Add the following snippet of HTML code. Note that the opening and closing tags are mandatory.
Sample:
Click to expand / hide
This is a sample content to demonstrate the use of the details tag.

Thanks for this Anisha 😊
LikeLiked by 1 person
I’m happy to share it with you, Happy Soul! ☺❣
LikeLiked by 1 person
😊❤️👍
LikeLiked by 1 person
Thank you so much! I have been wondering how to do this without a plugin. This came at the perfect time.
LikeLiked by 1 person
I’m happy to have offered a timely help! Thanks for the feedback.
LikeLiked by 1 person
My pleasure!
LikeLiked by 1 person
Thanks Anisha dear 🙂
LikeLiked by 1 person
Glad that this proved useful, Nima! ❣
LikeLiked by 1 person
😀 😀 😀
LikeLiked by 1 person
Okay. Got it. I never knew about the details and summary tags. Thank you for the explanation!
LikeLiked by 1 person
I’d very much appreciate if you’d try this someday when you code. I’m glad to have added a tidbit to your knowledge reserve.
LikeLiked by 1 person
Yes, I’ll definitely try this. Thank you! 🙂
LikeLiked by 1 person
That was something I was looking for but I would understand only if I try it once. Thanks for sharing
LikeLiked by 1 person
I’d look forward to seeing this feature on your future posts. I’m happy you found this useful!
LikeLiked by 1 person
Yeah I did. I was asking my husband about it. He said he will teach me how to do it and then I found your post.
LikeLiked by 1 person
Thanks for sharing this, Anisha ☺
LikeLiked by 1 person
I’m pleased to know you found this informative, Era! (:
LikeLike
it is indeed 😊
LikeLiked by 1 person
Waiting for more blogging tips from you. Thank you for sharing.
LikeLiked by 1 person
I’m pleased to know you liked this. I’ll certainly share more in the coming times. 😊
LikeLike