We've now learnt enough aches to AML to create some fairly complex documents.
We've been inventing our code using spaces and putting code on different lines to make sure our h.t.
email code is laid out in a clear way.
Space is tabs and New Line characters are commonly referred to as whitespace characters.
However there's nothing to say that we have to do this.
And if I remove some of this white space like that now a cold is much more difficult to understand.
But what we see in the browser isn't affected at all.
The browser doesn't care how much white space you have and don't have in your HP AML but without whitespace
in our source code it's quite difficult to work out what's going on.
It's much better to lay out our code nicely like this with embedded elements indented for example so
it's easier to read and therefore easier to maintain while so most cold editor software like atom here
will try and help you by barter Mattingly indenting new code for you.
If you're using the atom browser there's a package here that you can install that will clean up ugly
AITs term al fa you.
To install.
We go to the edit menu and select preferences and then click on install and will search for the atom
beautify package.
And then we'll click install takes a few seconds to install the package.
And once it's installed we can close the settings.
And to clean up some messy astm out.
We can select the packages menu go to atom beautify and select beautify And there we are.
The package has cleaned up our H.
Tim L. adding indentation and putting elements on different lines.
There are also some websites that will clean up some code for you.
All you have to do is paste your code onto the website.
And then submit the farm and it will form at the age to mail code for you.
Looking at this code.
Most of it is self-explanatory but as our h.t. email gets more and more complex sometimes you might
want to also annotate the code to help whoever is reading it to understand it.
There's a special tag in it tnl called A comment tag.
This that is the opening of a comment and this is the end.
Anything inside a comment tag isn't displayed in the browser.
Let's add a comment to our h.t. email here.
After the article heading.
In the browser the comment text is not displayed but if we view the sarce.
We can see it for this reason.
Be careful not to include anything you don't want the user to see in a comment as they can easily see
it.
If they do this.
You can even comment out more than one line.
So for example lets comment out the entire navigation section as you can see the Editor helps us by
colour coding the commented out section.
Now in the browser the whole navigation section isn't displayed but it is shown in the source.
Commenting out entire code blocks like this is a useful technique for when you're developing a new feature
that isn't ready yet.
For example.