Wednesday, April 23, 2025

JavaScript Doctype, Functions


<!DOCTYPE html>

<html>
<head>
</head>

<body>

<script>

	document.write("Hack The Planet");
	document.write("<br><br><br>");
	document.write("Mess with the best, die like the rest");

</script>
	
</body>
</html>

This is an HTML file that contains JavaScript code that writes text on the web page.

The <!DOCTYPE html> is an HTML5 document type declaration, indicating that the document is an HTML5 document.

The <html> tag encloses the entire HTML document.

The <head> section contains metadata about the document, but in this case, it is empty.

The <body> tag contains the content of the web page, including the JavaScript code.

The <script> tag is used to embed JavaScript code within an HTML document. The code inside the <script> tags will be executed by the browser.

The document.write() method writes text to the HTML document. In this case, it is used to write "Hack The Planet" and "Mess with the best, die like the rest" on separate lines, with three line breaks between them.

When the web page is loaded, the JavaScript code is executed, and the text "Hack The Planet" and "Mess with the best, die like the rest" are displayed on the web page.

No comments:

Post a Comment

Tkinter Introduction - Top Widget, Method, Button

First, let's make shure that our tkinter module is working ok with simple  for loop that will spawn 5 instances of blank Tk window .  ...