[an error occurred while processing this directive]
Go to Bottom Nav - April 21, 2018 - No exercises at this time - ERRORblah Happy Holidays and Semester Break!

Get the Source

The HTML that we are writing lies behind the scenes when viewed in a web browser. You can view your own source code (or HTML document) since you already have it on your hard drive. What if you want to view the source code of another's web pages?

Just about every web browser in existence has a "View" menu. Under the view menu, you will find an option of "Source," "View Source," or something similar. When you choose this option, the browser will create another window which has HTML code of the page viewable instead of rendered.

Now is the time to think about intellectual property. Any content or code you create is yours by copyright at the moment of creation. The same is true of others' creations. It is unethical and illegal to copy either for your use without permission and credit. In some instances, you may cite someone else's work and use excerpts as you would see in a scientific publication.

With proper respect to another's intellectual property, viewing another's source code is a great way to get creative ideas. Perhaps you will see a page layout that you admire and wish to do something similar. If you can't emulate it immediately, view the page source to give you hints on how to write your code.

Commenting

Once you can view a pages source code, you may find information in the <body> section that you could not see in the browser window. This could be text or code or both. It might look something like the following.

<!-- Anything you write between the opening an closing parts of this tag will be "commented" out of the page. -->

HTML comments are a great way to leave notes in your code. If you are working on a team project, each member can "sign" and date when changes are made in a comment. It is useful to leave a comment at the beginning and end of particularly complex coding passages to help yourself navigate. Comments are also very useful for notes on projects that you may not visit often; they can "refresh" your memory.

Heading One
Ut pharetra, ante eget imperdiet ullamcorper, tortor nunc sollicitudin orci, non cursus neque nisl eget ligula. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis vestibulum, nibh in suscipit interdum, velit magna volutpat turpis, at ornare sem magna et tellus. Sed pulvinar facilisis ligula, id vehicula eros sollicitudin a. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
Heading Two
Vivamus vestibulum, augue id iaculis sodales, odio odio feugiat arcu, scelerisque congue nisi ipsum vitae orci. Nunc sed ligula quam. Cras sed iaculis neque. Proin ultricies consectetur tortor, eu pulvinar sapien commodo ac. Cras diam arcu, lacinia id mattis ut, convallis sed massa. Nullam ut arcu lacus. Suspendisse ultricies elementum arcu ut dictum.
Heading Three
Sed aliquet augue ut ligula porta gravida pellentesque sapien semper. Duis mauris massa, semper pulvinar eleifend id, tincidunt fermentum nulla. Proin ipsum neque, imperdiet in vestibulum non, hendrerit ac nisi. Maecenas eleifend libero quis urna lacinia elementum. Etiam mi massa, sollicitudin nec accumsan in, aliquet in dui. Pellentesque consequat diam quis felis luctus a vehicula lectus mollis.
Pull Down Menu Close Menu