Не присваивается параметры в ксс, когда я пытаюсь присвоить классу или id
#term {
text-decoration-style: dotted;
text-decoration-color: black;
}
.sss {
text-decoration-style: dotted;
text-decoration-color: black;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>home3</title>
<style type="text/css">
h1,
h2 {
text-align: center
}
</style>
<link rel="stylesheet" href="home3.css">
</head>
<h1>HTML Tutorial</h1>
<h2>
<hr>What is HTML?</h2>
<div>
<p>
<b>Hypertext Markup Language <span id="term">(HTML)</span>
</b>is the standard markup language for creating web pages and web applications.
</p>
</div>
<div>
<p>
Web browsers receive <span class="sss">HTML</span> documents from a web server or from local storage and render the documents into multimedia web pages. <span class="sss">HTML</span> describes the structure of a web page semantically and originally
included cues for the appearance of the document.
</p>
</div>
<body>
</body>
</html>
Ответы (1 шт):
Автор решения: darinka poznyak
→ Ссылка
h1, h2 {
text-align: center;
}
#term {
text-decoration: underline dotted black;
}
.sss {
text-decoration: underline dotted black;
}
<body>
<h1>HTML Tutorial</h1>
<h2>
<hr>What is HTML?
</h2>
<div>
<p>
<b>Hypertext Markup Language <span
id="term">(HTML)</span>
</b>is the standard markup language for
creating web pages and web applications.
</p>
</div>
<div>
<p>
Web browsers receive <span
class="sss">HTML</span> documents from a
web server or from local storage and render
the documents into multimedia web pages.
<span class="sss">HTML</span> describes the
structure of a web page semantically and
originally
included cues for the appearance of the
document.
</p>
</div>
</body>
Для того, чтобы это работало, в text-decoration нужно прописать 3 свойства: вид подчеркивания (под строкой, над строкой, зачеркивает строку и т.д.), стиль подчеркивания (пунктир, сплошная линия, двойная линия и т.д.) и цвет подчеркивания