Display text <h1> <h5> using css
I want to show Mood Analysis in such a way that S will be much larger than the text h5.
What is wrong with follwing code:
HTML:
<h1>S</h1> <h5>entiment Analysis</h5>
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;
}
+4
6 answers
, inline inline-block display: inline; display: inline-block () <span> h1
<h1><span>H</span>ello</h1>
H
h1 > span {
font-size: 54px;
}
, :first-letter pseudo, .
. , ,
classid.
+3
Use this css rules for proper follow the css rules to render the requirement!
<style>
h1:first-line {
margin-left: 36%;
color:#C0C0C0;
font-family: "calibri";
font-size:1em;
text-decoration:underline;
white-space: pre;
display:inline;
}
h1:first-letter{
margin-left: 36%;
color:#C0C0C0;
font-family: "calibri";
font-size:2em;
text-decoration:underline;
white-space: pre;
display:inline;
}
</style>

+2
display:inline h1 h5, margin-left h5
h1
{
margin-left: 36%;
color:#C0C0C0;
font-family: "calibri";
text-decoration:underline;
white-space: pre;
display:inline;
}
h5
{
color:#C0C0C0;
font-family: "calibri";
text-decoration:underline;
white-space: pre;
display:inline;
}
Your way to implement this seems a bit complicated, even if you want to go with the code, you can use my answer, otherwise select any of the simple methods in the other answers here.
0