↓が打ったコードです
<html>
<head>
<meta http-equiv=“content-type”
content=“text/html; charset=shift_jis”>
<title>ニューヨーク日記</title>
<style type=“text/css”>
body { background:
lightyellow; }
h1 {background: green; }
</style>
</head>
<body>
<h1>ニューヨーク日記</h1>
<p>このサイトでは<a href=“http://newyork.com”>ニューヨーク</a>での生活日記を紹介していきます</p>
</body>
<html>
これを作ったのですが背景の色や見出しの色が変わりません
解決方法をお願いします!!
ポイントだけ指摘すると…。
<style> body { background-color: lightyellow; } h1 { background-color: green; } </style>
全体を見直すと…。
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <title>ニューヨーク日記</title> <style> body { background-color: lightyellow; } h1 { background-color: green; } </style> </head> <body> <h1>ニューヨーク日記</h1> <p>このサイトでは<a href=“http://newyork.com”>ニューヨーク</a>での生活日記を紹介していきます</p> </body> </html>