使用css显示<h1> <h5>内联文本

use*_*782 5 html css alignment html-heading

我想显示"情绪分析",这样S应该比h5文本大得多.

以下代码有什么问题:

HTML:

<h1>S</h1> <h5>entiment Analysis</h5>      
Run Code Online (Sandbox Code Playgroud)

CSS:

h1 {
    margin-left: 36%;
    color:#C0C0C0;
    font-family: "calibri";
    text-decoration:underline;
    white-space: pre;
}

h5 {
    margin-left: 36%;
    color:#C0C0C0;
    font-family: "calibri";
    text-decoration:underline;
    white-space: pre;
}
Run Code Online (Sandbox Code Playgroud)

CodePan中的实时代码

Sur*_*S M 6

这是一个混乱的代码.如果您只想制作第一个字母Bigger,可以尝试以下方法.

工作演示

HTML

<div>Sentiment analysis</div> 
Run Code Online (Sandbox Code Playgroud)

CSS

div:first-letter {
  font-size:30px;
  font-weight:bold;
}
Run Code Online (Sandbox Code Playgroud)


小智 0

<style type="text/css">
      .style1
    {
        font-size: 36px;
    }
</style>
</head>
<body>
<p>
   <span class="style1">S</span>entiment</p>
</body>
Run Code Online (Sandbox Code Playgroud)