▪ ▪2015-12-16 18:39:39
css
▪ ▪, 2015-12-16 18:39:39

Title in two lines. How best to implement?

What do you think is more acceptable for H1 in two lines?
The first option is to use the <br> and <span> tags for wrapping in the title itself. But then it can turn out to be porridge. The second option is to generally use a separate div for the second row. In this case, the title will be incomplete, which is not good for search engines.
Maybe there are other solutions?
32432423jp_4928344_19898774.jpg

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
Maxim Timofeev, 2015-12-16
@kingdomofcrooked

<h1>Петя курит мамбу <small>много курит</small></h1>
+ css to it and everyone is happy, including search engines

I
Ivanq, 2015-12-16
@Ivanq

https://jsfiddle.net/Ivanq/y7kn197L/1/

Z
Zvezdocheteg, 2015-12-16
@Zvezdocheteg

As an option, you can make a wrapper and limit its width or apply restrictions to the h1 itself. I heard the < br > tag is not recommended, but it's just a rumor)
here is an example: codepen.io/Profiteer/pen/qbbgBp

R
R3AD, 2015-12-17
@R3AD

<div class="name"><h1>Две строки</h1>один заголовок</div>
<code lang="css">
.name{
  text-align:right;
  line-height: 7px;
  width: 50%;
}
</code>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question