File tree Expand file tree Collapse file tree 4 files changed +98
-0
lines changed Expand file tree Collapse file tree 4 files changed +98
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+
4+ < head >
5+ < meta charset ="UTF-8 ">
6+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
7+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
8+ < title > Code Pen Bd</ title >
9+ < link rel ="stylesheet " href ="style.css ">
10+
11+ < link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta2/css/all.min.css "
12+ integrity ="sha512-YWzhKL2whUzgiheMoBFwW8CKV4qpHQAEuvilg9FAn5VJUDwKZZxkJNuGM4XkWuk94WCrrwslk8yWNGmY1EduTA== "
13+ crossorigin ="anonymous " referrerpolicy ="no-referrer " />
14+
15+ </ head >
16+
17+ < body >
18+ < div class ="container ">
19+ < div class ="left ">
20+ < label > < i class ="fa-brands fa-html5 "> </ i > HTML</ label >
21+ < textarea id ="html-code " onkeyup ="run() "> </ textarea >
22+ < label > < i class ="fa-brands fa-css3-alt "> </ i > CSS</ label >
23+ < textarea id ="css-code " onkeyup ="run() "> </ textarea >
24+ < label > < i class ="fa-brands fa-js "> </ i > JavaScript</ label >
25+ < textarea id ="javascript-code " onkeyup ="run() "> </ textarea >
26+ </ div >
27+ < div class ="right ">
28+ < label > < i class ="fa-solid fa-play "> </ i > Output</ label >
29+ < iframe id ="output "> </ iframe >
30+ </ div >
31+ </ div >
32+
33+ < script src ="script.js "> </ script >
34+ </ body >
35+
36+
37+ </ html >
Original file line number Diff line number Diff line change 1+ ### Live Demo
2+ ```
3+
4+ ````
5+ ### ScreenShot
6+ 
Original file line number Diff line number Diff line change 1+ function run ( )
2+ {
3+ let htmlcode = document . getElementById ( "html-code" ) . value ;
4+ let csscode = document . getElementById ( "css-code" ) . value ;
5+ let javascriptcode = document . getElementById ( "javascript-code" ) . value ;
6+ let output = document . getElementById ( "output" ) ;
7+
8+ output . contentDocument . body . innerHTML = htmlcode + "<style>" + csscode + "</style>" ;
9+ output . contentWindow . evel ( javascriptcode ) ;
10+ }
Original file line number Diff line number Diff line change 1+ *
2+ {
3+ font-family : 'Poppins' , sans-serif;
4+ }
5+ body
6+ {
7+ background-color : # 454545 ;
8+ color : # fff ;
9+ }
10+ .left , .right
11+ {
12+ flex-basis : 50% ;
13+ padding : 10px ;
14+ }
15+ .container
16+ {
17+ width : 100% ;
18+ height : 100vh ;
19+ padding : 4px ;
20+ display : flex;
21+ }
22+ textarea
23+ {
24+ width : 94% ;
25+ height : 28% ;
26+ background-color : # 1f1f1f ;
27+ padding : 10px 20px ;
28+ border : 0 ;
29+ outline : 0 ;
30+ font-size : 18px ;
31+ color : # fff
32+ }
33+ iframe
34+ {
35+ width : 90% ;
36+ height : 96% ;
37+ background-color : # ffffff ;
38+ color : black;
39+ border : 0 ;
40+ outline : 0 ;
41+ }
42+ i
43+ {
44+ padding-right : 5px ;
45+ }
You can’t perform that action at this time.
0 commit comments