How to Create a 2% HTML and 1% JavaScript Website?

Estimated read time 1 min read

Here’s an example of how you could create a simple website with a 2% HTML and 1% JavaScript content:

HTML:

<!DOCTYPE html>
<html>
  <head>
    <title>2% HTML, 1% JavaScript Website</title>
  </head>
  <body>
    <h1>Hello World!</h1>
    <p id="text">This is a simple website with 2% HTML and 1% JavaScript content.</p>
  </body>
</html>

JavaScript:

<script>
  document.getElementById("text").innerHTML = "This text was changed by JavaScript.";
</script>

In this example, the HTML page contains a header with the text “Hello World!” and a paragraph with the text “This is a simple website with 2% HTML and 1% JavaScript content.”. The JavaScript code uses the document.getElementById method to select the p element with the id of “text”, and then changes its text content to “This text was changed by JavaScript.”.

You May Also Like

More From Author

+ There are no comments

Add yours

Leave a Reply