Guidance portal

World of Guidance and Education

Insert Frames and Divs

In the chapter we will learn to insert frames and why Divs Tags are used on webpages.

Frames HTML:

Frames are used to insert the scrolling new tab inside the single browser tab. You can insert many frames in your browser.

The tag of frames is "frameset". Complete syntax is given below.

    <frameset rows="*" cols="your cols size,*" framespacing="your size" frameborder="your border size" border="your border">
    <frame src="UntitledFrame-2.html" name="leftFrame" scrolling="No" noresize="noresize" id="leftFrame" title="leftFrame" />
    <frame src="Untitled-1.html" name="mainFrame" id="mainFrame" title="mainFrame" />
    </frameset>

Lets insert the frame into the web page and then see how it looks like in the browser.

    <!DOCTYPE html>
    <head>
    <title>Untitled Document</title>
    </head>
    <frameset rows="*" cols="118,*" framespacing="0" frameborder="no" border="3">
    <frame src="UntitledFrame-2.html" name="leftFrame" scrolling="No" noresize="noresize" id="leftFrame" title="leftFrame" />
    <frame src="Untitled-1.html" name="mainFrame" id="mainFrame" title="mainFrame" />
    </frameset><noframes></noframes>
    <body>
    </body>
    </html>

    Browser view

Div html:

<div> tag is used to apply different formatings to the diffrent parts of a single webpage. To separate formatings we need to divide the page which is done by <div> tag. In the simple way "div tag" is a container where we contain specific formating for the specific part of web page.

Syntax of div tag is shown below

    <div>There is your paragraph ,table image any thing </div>

Just insert the opening div tag before writing the content you want to separate then insert clossing div tag after finishing the contents.

 

 

comments powered by Disqus