| View Source - A simple way to see how a
web page is written (HTML code sent to you by the web page server), just right-click
anywhere on the web page and select "View Source" to display a
Notepad page with the HTML code. This method is simple, but does not show the HTML
code of the page as actually displayed. Your browser continues to process embedded
directives and rearrange the code to generate the displayed page. Many of the POOL
Side pages have a "show/hide code" link at the top to display the rendered code
in a text box. Click here for "show/hide code"
details. My "show/hide code" will not help you when viewing other
internet pages. The solution is to have a portable method at you finger tips.
You can do that by creating a favorites link that will show the code as rendered of any
web page in a current window. The following JavaScript is the content of the such a
favorites link:
The effect of this script is to re-write, in the same window, the web page being viewed
with the rendered HTML code used to display the page as the content. Clicking on
your "Refresh" button or the <F5> key
will restore the original page. To activate the above JavaScript, create a new item
in your favorites list:
- Copy the contents of the above textarea box to your clipboard
- Open any web page in your browser (this one is OK)
- Left-click on your "Add to Favorites" button and select
"Add to favorites ..." (Ctrl-D)
- Change the name to "View Source" and select where you want to
place it
- Left-click the "Add" button to finish (Alt-A)
- Open your favorites list (Alt-C)
- Locate and Right-click on "View Source"
- Select "Properties ..."
- Paste the clipboard contents to replace the URL: field (Ctrl-V)
- Left-click "OK"
Most of the script is formatting. The inactive <xmp> ... </xmp>
tag is the trick. This tag suppresses all contained HTML markup tags. See http://www.w3.org/MarkUp/html-spec/html-spec_5.html
for clarity on page elements. The JavaScript "unescape()" function is
referenced along with others at http://www.w3schools.com/jsref/jsref_unescape.asp
. This function converts the %20 (space) and others to readable text.
Now whenever you are curious about how a page was written, just select View
Source from your favorites list and click your Refresh button
when done. Any parts of the temporary web page may be copied and
added to your web pages or printed for future reference. |