css - How to avoid iframe embedding code? -
i want change style of text embedding following markup
<iframe src="url">
my web page has limited amount of characters can used fast coding in css , html. code i'm using iframe embed this:
<style type="text/css"> body { color: black; } h1 { color: #ffffff; } h2 { color: rgb(255,255,255); } </style> <h1>hello world!</h1>
but when i'm using following embed it:
<iframe src="the raw url of code above" frameborder="0">
...the whole code showing, not hello world!
in #ffffff.
what doing wrong here? embed hello world!
know css on parent page not change style of source i'm putting in iframe.
since iframe embedding html documents, should try using valid html external file. this:
<!doctype html> <html> <head> <title>iframe example</title> </head> <body> <style type="text/css"> body { color: black; } h1 { color: #ffffff; } h2 { color: rgb(255,255,255); } </style> <h1>hello world!</h1> </body> </html>
Comments
Post a Comment