Home arrow HTML arrow Page 3 - Frames and Lists in HTML
HTML

Frames and Lists in HTML


In our previous article we learned to work with links and entities (or special characters) in HTML and how HTML handles white space. In this episode we will discuss how to use frames to create pages within the page and how to use lists.

Author Info:
By: James Payne
Rating: 4 stars4 stars4 stars4 stars4 stars / 5
January 23, 2008
TABLE OF CONTENTS:
  1. · Frames and Lists in HTML
  2. · Setting a Frame in the Horizontal Position
  3. · Displaying Frame with the Iframe
  4. · Lists in HTML
  5. · The Unordered List
  6. · Working with Nested Lists

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Frames and Lists in HTML - Displaying Frame with the Iframe
(Page 3 of 6 )

The Inline frame allows you to create a frame with an HTML page, as opposed to displaying an HTML page within a frame. Here is how you do it:


<html>

<body>


<p> <h1> Here is some code</h1>

<p> blahkhskjhkashdkashksahdkas

<br>hkhsadkhkhsakhkasjhdkjhaskdhaskdhakshdkasjhkdhaskjdhas

<br>kjhdkashdkashdkashkahskhjaskjhaskjdhkasjhdkashdkasjhdk

<br>ashdkasjhkhaskdhaksjhdkashdkashkdhakshkash</p>


<p><h2> Want to see a cool frame?<h2></p>

<iframe src="http://www.devshed.com"></iframe>

</body>

</html>

The line <iframe src=http://www.devshed.com></iframe> creates the inframe inside the page and displays the Developer Shed website within it.

Note that if you want to link to a page outside of your own you must include the http:// portion in the url.

Creating Frames that Cannot Be Resized

You may or may not have noticed that when you hover over the lines that separate certain frames, you can resize them. If you want to ensure that visitors to your website cannot do so, you can program your frames using noresize, like so:


<html>


<frameset rows="20%,80%">


<frame noresize="noresize" src="firstframe.htm">


<frameset cols="20%,80%">

<frame noresize="noresize" src="secondframe.htm">

<frame noresize="noresize" src="thirdframe.htm">

</frameset>


</frameset>


</html>

Arnchors and Links

You may have a table of contents page on your site, similar to our navigation frame, with the content in the right frame. When users click on a link in the Table of Contents section, instead of loading a new page, it goes to a specific section on the Contents page. You can do so in the following manner:

<a href ="contents.htm" target ="contentsframe">Link with No Anchor</a><br>

<a href ="contents.htm#chapter01" target ="contentsframe">Link with an Anchor</a>.

This works like the Anchor tag in our previous tutorial on working with Links in HTML. When the use clicks the link embedded in the text “Link with No Anchor,” it simply loads the contents page. When the user clicks the link stored in the text “Link with an Anchor,” it loads the contents page and takes you to the anchored section (in this case, Chapter 01).


blog comments powered by Disqus
HTML ARTICLES

- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5
- BBC Adopts HTML 5, Mozilla Addresses Issues
- Advanced Sticky Footers in HTML and CSS
- HTML and CSS Sticky Footers
- Strategy Analytics Predicts HTML5 Phones to ...
- HTML5 Guidelines for Web Developers
- Learning HTML5 Game Programming
- More Engaging CSS3 and HTML Background Effec...
- Engaging HTML and CSS3 Background Effects
- More Web Columns with CSS3 and HTML
- Columns with CSS3 and HTML
- Creating Inline-Block HTML Elements with CSS
- Drag and Drop in HTML5: Parsing Local Files

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 7 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials