Use HTML <details/> tag to hide/display content

Documentation is an important part of software development, But sometimes, large blocks of code or steps with multiple, lengthy steps can overtake the main points being made to the reader.

In these situations, try using the HTML <details> tag to allow for content to be initially hidden and expanded if the reader wants to explore the content in-depth.

This <details> tag provides for a summary with an expandable detailed view when clicked. See the example below:

Click to expand

The code that just made this work looks like this:

<details>
  <summary>Click to expand</summary>
  The code that just made this work looks like this:
</details>


As of this post, this tag is supported in all major browsers.

See the article from the Mozilla Developer Network (MDN) for more details.

Opening Windows Command Prompt and PowerShell to current Explorer location

I recently came across an article (wish I still had the link) that mentioned how to quickly open a command prompt with the same working directory as the current folder in Windows Explorer.

All these years using Windows and it is still so easy to learn something new!

I recently came across an article (wish I still had the link) that mentioned how to quickly open a command prompt with the same working directory as the current folder in Windows Explorer.

For so long I have used the painful process of copying the current location from the Explorer address bar, opening a command prompt and typing in:

cd /d {folder path}

Solution

The solution is so obvious that it is a little painful to just be learning it now. 🙂

From the explorer window, just type cmd into the address bar and hit enter.

Bingo!

Powershell

Also works with PowerShell!

Nice!

Going in reverse

And of course, to go from a command window to Explorer to browse the current working directory of the command window, just type in explorer . into the command window and hit enter.

Browse away!

While I wish I had thought to try this years ago, I’m at least glad I know it now. It’s never to late to learn a new trick.