如何在单行中使用列表标签
How to use list tag in single line
我想在同一行中使用两个具有不同 css 样式的列表项。如:
历史:研究过去发生的事件。
Botony:植物研究。
(历史和植物学以粗体显示,比描述大 2px。
但他们是这样来的:
历史:
研究过去发生的事件。
波托尼:
植物研究。
下面是我使用的代码:
<li id="subhead">History: </li><li id="describe"> Study of incidents happened in the past.</li></li><br>
<li id="subhead">Botany: </li><li id="describe">Study of plants.</li><br>
#subhead
{
float:left;
margin-left:30px;
list-style-image:none;
font-family:Times New Roman;
font-size:19px;
text-align:left;
font-weight:bold;
padding: 0px 0px 0px 10px;
display:inline;
}
#describe
{
float:left;
list-style-image:none;
list-style-type:none;
font-family:Times New Roman;
font-size:17px;
padding-left: 30px;
display: inline;
}
我怎样才能完成它?
请告诉我是否可以使用 p 标签做同样的事情。
#subhead
{
font-size:17px;
display: block;
margin-left:30px;
list-style:none;
font-family:Times New Roman;
text-align:left;
padding: 0px 0px 0px 10px;
disply:inline;
}
#subhead span{font-weight:bold;font-size:19px;}
<li id="subhead"><span>Physics: </span>Wilhelm Conrad Röntgen's for the discovery of X-rays.</li>
<li id="subhead"><span>Chemistry: </span> Jacobus Van't Hoff for chemical thermodynamics.</li>
我想在同一行中使用两个具有不同 css 样式的列表项。如:
历史:研究过去发生的事件。
Botony:植物研究。
(历史和植物学以粗体显示,比描述大 2px。
但他们是这样来的:
历史:
研究过去发生的事件。
波托尼:
植物研究。
下面是我使用的代码:
<li id="subhead">History: </li><li id="describe"> Study of incidents happened in the past.</li></li><br>
<li id="subhead">Botany: </li><li id="describe">Study of plants.</li><br>
#subhead
{
float:left;
margin-left:30px;
list-style-image:none;
font-family:Times New Roman;
font-size:19px;
text-align:left;
font-weight:bold;
padding: 0px 0px 0px 10px;
display:inline;
}
#describe
{
float:left;
list-style-image:none;
list-style-type:none;
font-family:Times New Roman;
font-size:17px;
padding-left: 30px;
display: inline;
}
我怎样才能完成它?
请告诉我是否可以使用 p 标签做同样的事情。
#subhead
{
font-size:17px;
display: block;
margin-left:30px;
list-style:none;
font-family:Times New Roman;
text-align:left;
padding: 0px 0px 0px 10px;
disply:inline;
}
#subhead span{font-weight:bold;font-size:19px;}
<li id="subhead"><span>Physics: </span>Wilhelm Conrad Röntgen's for the discovery of X-rays.</li>
<li id="subhead"><span>Chemistry: </span> Jacobus Van't Hoff for chemical thermodynamics.</li>