PhpBox
WebBox
HTML
CSS
JavaScipt
PHP
をブラウザで簡単に確認できる
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>HTMLの基本</title>
</head>
<body>
<h1>こんにちは!</h1>
<p>これはHTMLのサンプルです。</p>
<button>ボタン</button>
</body>
</html>
このコードをコピー&ペーストしてつけて下さい
実行前(コードを「貼り付け」した)
実行後
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>WebBoxサンプル</title>
<style>
body {
font-family: sans-serif;
background-color: #f0f8ff;
padding: 20px;
}
h1 {
color: blue;
}
button {
background-color: green;
color: white;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
}
</style>
</head>
<body>
<h1>Webプログラミング入門</h1>
<p id="message">ボタンを押してください</p>
<button onclick="showMessage()">
クリックしてみよう
</button>
<script>
function showMessage() {
document.getElementById("message").textContent =
"こんにちは!JavaScriptが動きました!";
}
</script>
</body>
</html>
コードをコピペして「実行」ボタンをおした