+ 1
How can I add html5, javascript and css3 in the same text
3 Respostas
+ 2
Rishu Patel,
CSS:
You need to assign the style tags inside the head tag to work with CSS inside a HTML document.
https://www.w3schools.com/TAGs/tag_style.asp
JavaScript:
To work with JS inside a HTML document it is optional to assign script tags.
Place the JS script on the bottom of the body tag. Therefore HTML need to load first before JS can interact with HTML.
HTML5:
By giving the HTML document a doctype at the begin of the content. HTML knows HTML5 is supported.
Hope this helps👍
<!DOCTYPE HTML>
<html>
<head>
<!-- CSS -->
<style>
body {
background-color:red;
}
</style>
</head>
<body>
<div id="boxOne"></div>
<!-- JAVASCRIPT -->
<script>
document.getElementById("boxOne").innerHTML=("Hello World");
</script>
</body>
</html>
Additional:
https://code.sololearn.com/W0NN5U3pKCi4/?ref=app
0
thank
0
You're welcome. 👍
Added additional code to the post to see the output.