定义列表的样式设置
默认情况下,<dd> 标签会以块级元素显示并带有缩进,这使得术语和描述更容易区分。不过,你也可以使用 CSS 调整其样式。将以下样式添加到你的 HTML 代码中,以修改定义列表的外观:
<!doctype html>
<html>
<head>
<title>HTML Data Description Tag Example</title>
<style>
dd {
font-style: italic;
}
</style>
</head>
<body>
<dl>
<dt>HTML</dt>
<dd>
HTML stands for Hyper Text Markup Language. It is used to create and
structure content on the web.
</dd>
<dt>CSS</dt>
<dd>
CSS stands for Cascading Style Sheets. It is used to style HTML elements
and make web pages look visually appealing.
</dd>
</dl>
</body>
</html>