![]() |
HTML Basics:
|
|
||||
|
![]() |
The source code for your web page is getting long enough to be getting harder to read. You can count on having to edit your code later. It is important to be able to find the part you want to edit!
hector3.htm There are a number of little tricks you can use to help.
White space between tags in the code is generally not seen at all on the page when
viewed in a browser. So you have a lot of freedom to rearrange things to
suit yourself. |
![]() |
Project 2: HTML Basics
Search Glossary Appendix |
|||||||||
HTML editing software can automatically make some spacing and indention changes for you. It can also color code your tags, to make them easier to pick out of the code. By the time you finish this lesson, you will see why HTML authors value this automation!
Source code after reformatting with HomeSite 4
Start with: You don't need fancy software to make your code easier to read. Just add some white space as you go along. Add Blank LinesGaps between sections helps you spot what you are looking for. You will add some blank lines between document parts.
Add IndentionsYou can use indentions to create visual outline of your document. By indenting the items in a list, for example, you visually set them off from the rest of the document.
Yellow block show where indents were added. Add CommentsThe longer your page gets, the more important it is to include hidden comments. Such comments can point out special spots on the page or label sections to make it easier for you to find them later. You can even use Search to find the right spot. Use comments to explain what is going on in complex pages. It is unfortunately common to completely forget why you wrote what you wrote! Comments do not show when you view the page in a browser, but anyone who opens the source code can read them. Make it a regular practice to add comments as you create the page.
Advanced editing programs are smart enough to notice changes made by another program and will ask if you want to update the copy in that program. However, it is still easy to get confused and dump changes that you meant to keep!
|
![]() |
~~ 1 Cor. 10:31 ...whatever you do, do it all for the glory of God. ~~ |