Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Showing <h1> <h5> text inline using css

I want to show "Sentiment analysis" such that S should be much larger then h5 text.

What's 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;
}

Live code in CodePan

like image 664
user3121782 Avatar asked Dec 26 '13 12:12

user3121782


1 Answers

That's a messy code. If you just want to make the first letter Bigger, You can try the following.

Working Demo

HTML

<div>Sentiment analysis</div> 

CSS

div:first-letter {
  font-size:30px;
  font-weight:bold;
}
like image 166
Surjith S M Avatar answered Sep 22 '22 02:09

Surjith S M