Embed Website HTML Without iFrame
Last Updated : Jan 1, 2023
IN - HTML
In this tutorial we will show you the solution of embed website HTML without iFrame, in HTML today we will show you how to embed html website without iframe. We want to say here that there are many ways with the help of which you are able to embed html websites.
The tag which is most time used for this job is iframe tag. But the concept is here that we want to remove iframe tag here and want to use alternative of this tag.
Step By Step Guide On Embed Website HTML Without iframe :-
As, we already say that there are many ways to embedding html website and the most common method is used of iframe. But we are not allowed to use iframe here.
So, use embed tag here. You can also use object tag, we will also learn about this in next session. But in today’s article we will talk about embed tag.
Let us understand what we can do in html code so that embed can replace the iframe tag. The code for this is given as:
<!DOCTYPE html> <html> <head> <title> Title of the document<title> </head> <body> <center> <h1 style="color:green">Talkers code</h1> <!-- this is only for educational purposes --> <p>Alternative of iframe tag</p> <embed src="https://www.talkerscode.com" width="1000" height="500" style="border: 1px solid white; box-shadow: 0 0 5px black;" /> </center> </body> </html>
- First, we write <! DOCTYPE html> which we used as an instruction to the web browser about what version of HTML file is written in.
- Secondly, the <html> tag is used to indicate the beginning of an HTML document.
- As above now <head> tag is used to contain information about web page. In this tag a <title> tag is used which helps us to specify a webpage title. Both <head> and <title> tags are Paired tags. So, both have </head> and </title> ending tags respectively.
- Thirdly, <body> tag is used to define the webpage body. All the contents to show on website are written here. Here, in body tag first we use center tag. It is not mandatory to use center tag. We only use this tag for better and maintained looks of html page.
- Now, after center tag we use heading tag. After this we use a paragraph tag.
- But the main concept is here which we go to describe. After paragraph tag, we use embed tag. If you don’t know about embed tag like what is embed tag and why it is used. Then you must one time go through our article in which we talk about embed tag.
- In embed tag, we use source that is src attribute and in this attribute we have to give the value of website which we want to show as link.
- And height, width are used to give dimensions to embed tag. Rest is in style tag that is border and border shadow, which is used for looks of embed tag to show this in more creative way.
- At last, the <body> and <html> tags are closed with </body> and </html> respectively.
In conclusion, here we can say that here we found the alternative of iframe tag. And the CSS used is up to you. I hope this tutorial on embed website HTML without iFrame helps you.