You would think such a simple feature with HTML would not cause much trouble, but I have a different story after trying to correct a mysterious bug on a web app was I was working on.

On an ASP.NET Core project, I was building a registration system for new users to the application. Everything was fine and dandy until I clicked on a button, and it did not work as intended. It worked similar to how it intended. So, I assumed it was because of a bug in functionality. I scoured the code for the answer. I was struggling as to why it just was not operating as intended. The logic seemed fine. The button that I was clicking seemed fine.

Then, I realized that when I clicked other buttons it was doing the same exact thing. What could it be?

I had no clue that the content layer could cause so much trouble. I had an anchor tag in the HTML markup that was not closed. My inexperience as a web developer brought me to my knees as I spent about a week trying to the figure this out. And, it was difficult to track down where the anchor tag was. I looked the C# all the way up and down to no avail. What led me to look at the HTML was pure intuition. I parsed through the code with my eyes, analyzing every single character. And, then, there it was.

If you find some strange behavior with clickies on your site leading to strange places, this just might be the culprit. Thank God for linters that show you what is closed and what is not nowadays!