试图在同一行上有一个 Header 和无序列表项

Trying To Have A Header And Unordered List Item On Same Line

我看了又看,并尝试了 CSS 的不同变体,但到目前为止没有成功。

不确定这是否可行,但尝试在无序列表项中包含 H4 和内容。

我可以将 H4 添加到列表项中,但在标题之后,内容一直从下一行开始,如“我不断获取示例的问题模型”中所示。我尽量让内容和H4保持在同一行,如果字符太多,文本可以转到下一行。

代码示例

<ul>
<li><h4>H4 Headline</h4> - This is the text that will start on the same line as the headline. This is the text that will start on the same line as the headline. This is the text that will start on the same line as the headline.</li>
<li><h4>H4 Headline</h4> - This is the text that will start on the same line as the headline. This is the text that will start on the same line as the headline. This is the text that will start on the same line as the headline.</li>
<li><h4>H4 Headline</h4> - This is the text that will start on the same line as the headline. This is the text that will start on the same line as the headline. This is the text that will start on the same line as the headline.</li>
</ul>

我需要示例的模型

问题的模型我一直在举例子

关于如何实现这一点有什么建议吗?

您需要做的就是在 CSS 部分使用以下内容

h4{
   display: inline;
}