Professional Documents
Culture Documents
GRADE
11
Name: _______________________________________________________________________
After this lesson, you will be able to answer the following questions:
• What are Block and Inline Elements?
• What is an Iframe?
• How to create an Iframe that is Targeted by a Link?
LESSON PROPER
Block-level Elements
• A block-level element always starts on a new line.
• A block-level element always takes up the full width available (stretches out to the left and
right as far as it can).
• A block level element has a top and a bottom margin, whereas an inline element does not.
Page | 1
Inline Elements
• An inline element does not start on a new line.
• An inline element only takes up as much width as necessary.
HTML Iframes
The HTML <iframe> tag specifies an inline frame.
An inline frame is used to embed another document within the current HTML document.
HTML Iframes
• An HTML iframe is used to display a web page within a web page.
• The HTML <iframe> tag specifies an inline frame.
• An inline frame is used to embed another document within the current HTML document.
Page | 2
Iframe Target for a Link
• An iframe can be used as the target frame for a link.
• The target attribute of the link must refer to the name attribute of the iframe
Page | 3
<iframe src=”1.html” name=”ed” height=”300” width=”300”></iframe>
Page | 4
<iframe src=”1.html” name=”ed” height=”300” width=”300”></iframe>
REFERENCES:
https://www.w3schools.com/tags/tag_img.asp
https://w3schools.com/html/iframes
Page | 5
ASSESMENT A
1 How can we target our iframe? What attribute of <a> tag we will use?
2 How are we going to name our iframe? What attribute we will use?
A src
B name
C height
D target
A src
B name
C height
D target
Page | 6
4 What tag is used to create Inline Frames?
A <iframe>
B <inline>
C <frames>
D <insert>
B Inline Element
C Both A and B
B Inline Element
C Both A and B
B Inline Element
C Both A and B
Page | 7
8 This element always takes up the full width available.
B Inline Element
C Both A and B
B Inline Element
C Both A and B
10 Every HTML element has a default display value. What are these values?
B Inline Element
D Both A and B
E Both B and C
Page | 8
ASSESMENT B
Build you own code based on the given task and situation.
EXAMPLE
• Create an inline frame or iframe.
• The iframe should have the height and width of 400.
• Put “quizizz.com” inside your iframe.
EXAMPLE ANSWER
1
• Create an inline frame or iframe.
• The iframe should have the height and width of 300.
• Insert the filename “main.html” inside the iframe.
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
_______
Page | 9
2
• Create an inline frame or iframe with the height 200 and width of 300.
• Name your iframe “frame1”.
• Insert the filename “main.html” inside the iframe.
• Create and make the text “contact us” a hyperlink going to “contact.html”.
• The hyperlink “contact us” should target your iframe.
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
Page | 10
________________________________________________________________________________