Learning Report #1
Using Frames
The resource I used was an html code tutorial from http://www.htmlcodetutorial.com/frames/frames.html.
What I learned
In a website it is important to divide up the content into different frames for several reasons.
- It is ascetically pleasing.
- Organization is improved.
- It prevents unnecessary re-loading of all the site's content when only a certain part of the total content needs to be changed by loading a new frame.
These sections that the website is divided up into are called frames. This is accomplished by first having a main page which is divided up into specified frames. Each frame is given a name which is important for specifying targets in anchor tags. Each section furthermore is given the url of the page that needs to be retrieved and put in that section.
What is basically happening is that the browser is toled to go and get five different pages and load them all together on one page in different sections. It is also important that each of the frames sizes are specified. This can either be done by percents or by specifying pixel values.
How I implemented frames
These steps I took to implement frames are as follows:
- I changed the name of my home page from index.shtml to main.shtml.
- I created a simple header and navigation page
- I created an new index.shtml page which defined where and what sizes the frames should be and referenced the nav, header, main page I had created.
This caused an issue however. The navigation section is a seperate page, and by default if somebody clicked an item to view a different part of my site, it would load it in the navigation page. This is why it was important to give names to each of the frames and I had to add a target="framename" to each of my anchor tags.