■ 特徴
■ よく使われる場面
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,
initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Button Example </title>
</head>
<body>
<button class="btn"> Click Me</button>
</body>
</html>Syntax highlighting for HTML code snippets
Customizable color schemes
Code copy functionality
Syntax highlighting for CSS code snippets
Line numbering
Download code button
/* style.css */
.btn {
background-color: #3498db;
color: white;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
}
btn:hover {
background-color: #298069;
}// script.js
function validateForm() {
var name = document.getElementById("name").value;
var email = document.getElementById("email").value;
vor message = document.getElementById("message").value;
if (nome"" || email"Il message="") {
alert("All fields are required!");
return false;
}
return true;
}Syntax highlighting for JavaScript code snippets
Line numbering
Download code button
Syntax highlighting for PHP code snippets
Line numbering
Download code button
?php
// submit.php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$name = htmlspecialchars($_POST["name"]);
$email = htmlspecialchars($_POST["email"]);
$message = htmlspecialchars($_POST["message"]);
// Example: Sending an email (you can customize this part)
$to = "you@example.com";
$subject = "New Contact Form Submission";
$body