Coding problems aka end tags are important

I have done some coding for other classes, so I felt pretty good about working on my first full website and for the most part, it went fairly smoothly. However, I had some difficulty getting my container divs to work correctly. This was caused because I lost track of which end tags belonged to which divs and then had to go back and read through all of my html to figure it out.

What I learned from this is having a well-organized code is the best way to make things easier for yourself in the long run. I’ve started commenting out labels for the div tags to help my future-self understand what each </div> refers to. This has been really useful so far not only because when I read through I can keep track of what is going in each div, but also because it allows me to search directly for the end of a specific tag. By taking the extra time to label my tags, I’ve been able to save time when I look back on my code to make changes and fix errors. It’s especially helpful because I’ve been using the same basic HTML template to create my different pages, so as I add and change content it helps me make sure I am making those changes correctly.

Also a helpful tidbit: if you want to comment things out but can’t remember how to do that in CSS, HTML or JavaScript, you can highlight the text and choose command /

This will work in any of those codes. It’s super helpful, especially if you are forgetful like me.  Life lessons from me: get organized and keep notes as you write your code. You never know when you’ll need them.


One thought on “Coding problems aka end tags are important

  1. Thanks a lot for mentioning the shortcut of commenting out with “command+foreslash”! I can relate to most of the problems you mentioned. I think it’s a little bit time-consuming for indenting everything just to see the the structure, and sometimes just not willing to do so. And another headache was about different code editors, some offer tag wrapping(TextMate, TextWrangler), others offer hint or preview of the elements(Bracket), but none of them contain all of the features.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s