Post History
Since the examples I've given in the question are deliberately brief, they don't demonstrate the benefit of hiding a large block of text. I'm giving an example in this answer of one of my own chall...
Answer
#1: Initial revision
Since the examples I've given in the question are deliberately brief, they don't demonstrate the benefit of hiding a large block of text. I'm giving an example in this answer of one of my own challenges where I have used expandable `<details>` sections to hide parts of the challenge wording that might be seen as optional. I'd be interested to hear where you would draw the line between what is worth hiding and what is not (or that you would hide everything/nothing). The challenge is [Balanced quinary quasiquine](https://codegolf.codidact.com/posts/287173) and I treated the sections as follows: ## Hidden sections I have hidden two subsections in the Terminology section. My reasoning was that these are both established terms ("Quinary" and "Balanced Quinary") independent of this challenge, so for anyone already familiar with a term, that subsection does not need to be read. I also hid a later subsection called "Detailed justification" that explains why I chose the threshold I did for what counts as a trivial case. The statement of ***what*** counts as a trivial case is displayed, but the explanation of ***why*** is hidden. My reasoning was that everyone needs to know what is excluded as too trivial, but anyone who is happy to simply accept that decision doesn't need to see the reason why. The section is there for anyone who needs to know that the decision wasn't arbitrary. ## Displayed sections I have left visible the sections "Input", "Output", and "Test cases" because these are challenge specific, unlike the established terms in the terminology section. Everyone taking part in this challenge will have to read all of these sections to know what counts as a valid answer. ## Reasons I considered hiding more More recently I have tried to think about who I'm optimising for. For a person reading the challenge for the first time ready to write an answer, the decisions described above are what made sense to me personally at the time. For a person who has already posted an answer and just wants to check one specific thing (perhaps whether an alternative input format is permitted) maybe it would be easier to just expand the relevant section rather than be presented with the entire text of the challenge. There is also the perspective of someone who has already read the text of the challenge and is regularly revisiting it to see new answers. Perhaps it would be easier for them to have everything hidden so they don't have to scroll down to the answers section. However, as [Olin Lathrop's answer](https://codegolf.codidact.com/posts/287280/287283#answer-287283) points out, the section headings are already there. These serve the purpose of making specific information easier to find without needing to hide their content, and scrolling is easy. Perhaps part of my incentive for making expandable sections is that I tend to write quite long input and output specifications. I try to reduce these as much as possible before posting, but I still usually feel like the challenge wording is too long. Maybe instead of making a challenge artificially shorter by hiding some sections, I should try to get better at spec golfing.