This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>My Page</title> | |
</head> | |
<body> | |
<h1>Welcome to my page</h1> | |
<p>This is some text on my page</p> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script><![CDATA[ | |
function showMessage() { | |
alert("Hello World!"); | |
} | |
]]></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Car(make, model, year) { | |
this.make = make; | |
this.model = model; | |
this.year = year; | |
this.drive = function() { | |
console.log(`Driving my ${this.year} ${this.make} ${this.model}`); | |
}; | |
} | |
const myCar = new Car('Toyota', 'Camry', 2019); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>My XHTML Page</title> | |
</head> | |
<body> | |
<h1>Welcome to my XHTML Page</h1> | |
<p>This is a simple example of an XHTML page.</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<label>Quantity: <input type="number" id="quantity" onchange="updateTotal()"></label> | |
<label>Price: $<span id="price">10</span></label> | |
<label>Total: $<span id="total"></span></label> | |
<script> | |
function updateTotal() { | |
var quantity = document.getElementById("quantity").value; | |
var price = document.getElementById("price").innerHTML; | |
var total = quantity * price; | |
document.getElementById("total").innerHTML = total; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="submitform.php" method="post"> | |
<label for="name">Name:</label> | |
<input type="text" id="name" name="name" /> | |
<br /> | |
<label for="email">Email:</label> | |
<input type="text" id="email" name="email" /> | |
<br /> | |
<label for="gender">Gender:</label> | |
<input type="radio" id="male" name="gender" value="male" checked /> | |
<label for="male">Male</label> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE myDoc SYSTEM "myDoc.dtd"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img src="image.jpg" alt="A beautiful landscape of a mountain range"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1 style="color: red;">This is a heading</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Stylesheet Examples</title> | |
<!-- External Stylesheet --> | |
<link rel="stylesheet" href="styles.css" type="text/css" /> | |
<!-- Internal Stylesheet --> | |
<style> |