<!DOCTYPE html>
<html lang="en">
<head>
<title>HTML Comment Example</title>
</head>
<body>
<!-- h1 heading to center: This is a comment. -->
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
</body>
</html>
MS Excel: Master spreadsheet skills from basic formulas to advanced data analysis, empowering you to manage and visualize data efficiently.
MS Word: Unlock the art of word processing with Microsoft Word, creating documents that are polished and professional.
PowerPoint (PPT): Master the art of visual storytelling using Microsoft PowerPoint, creating captivating presentations that leave a lasting impact.
body {
font-family: 'Arial', sans-serif;
margin: 20px;
text-align: center;
}
h1 {
color: #4285f4; /* Google Blue */
}
p {
color: #34a853; /* Google Green */
}
<p id="message">Click the button!</p>
<button id="clickButton">Click Me</button>
// JavaScript code
var messageElement = document.getElementById("message");
var clickButton = document.getElementById("clickButton");
function updateMessage() {
messageElement.textContent = "Button was clicked!";
}
clickButton.addEventListener("click", updateMessage);
print("Hello, World!")
def factorial(n):
if n == 0 or n == 1:
return 1
else:
return n * factorial(n - 1)
num = int(input("Enter a positive integer: "))
if num < 0:
print("Factorial is not defined for negative numbers.")
else:
result = factorial(num)
print(f"Factorial of {num} is {result}.")
public class SumCalculator {
public static void main(String[] args) {
// Declare and initialize two numbers
int num1 = 5;
int num2 = 10;
// Calculate the sum of the two numbers
int sum = num1 + num2;
// Display the result
System.out.println("The sum of " + num1 + " and " + num2 + " is: " + sum);
}
}