L
L
L1nw0od2021-02-23 11:26:06
HTML
L1nw0od, 2021-02-23 11:26:06

Is it possible to use h1. ?

Good day, please tell me if I have an h1 tag and I want the whole sentence to be on the desktop and hide some word on the mobile phone (how it doesn’t fit in the block) - is it possible?
---
And the second question is if you use a tag in the h1 tag
- will it somehow affect search engine optimization? Is it possible to do so?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Svyatoslav Smirnov, 2021-02-23
@Svyat_smirnov

The h1 tag should only be used as a header, it cannot be used as a container. There are other tags for this, such as . But in this case, use span. Then we get:

@media(max-height:990px){
      .top__title span{
             display:none;
       }
}

But this is all very wrong. The text shouldn't be hidden like that. It needs to be made flexible.

D
Danny Arty, 2021-02-23
@DanArst

and on a mobile phone to hide some word (how it doesn’t fit in a block) - is it possible so?

Read more about adaptive layout. It is better to reduce the font size to fit all the text than to hide a word. All the same, H1 is an important element and it is undesirable for it to differ from the desktop version.
And the second question is if you use a tag in the h1 tag
- will it somehow affect search engine optimization? Is it possible to do so?

What tag? If the text formatting tags, then you can.

P
Page-Audit.ru, 2021-06-22
@PageAuditRU

H1 doesn't like any nested tags.
Dig in the direction of CSS overflow ellipsis, it hides the "extra" content itself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question