Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Copa WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Como adicionar uma quebra de linha no WordPress (novo espaçamento de linha)

Nota editorial: Ganhamos uma comissão de links de parceiros no WPBeginner. As comissões não afetam as opiniões ou avaliações de nossos editores. Saiba mais sobre Processo editorial.

Deseja adicionar uma quebra de linha no WordPress ou ajustar o espaçamento entre os blocos?

Na maioria dos processadores de texto, você pode adicionar facilmente um espaço extra de linha em branco pressionando a tecla Enter algumas vezes. Também é possível criar linhas com espaçamento duplo após os parágrafos nas opções de formatação. Entretanto, o editor de blocos do WordPress não tem esses botões.

Neste artigo, mostraremos a você como adicionar facilmente uma quebra de linha no WordPress.

How to Add a Line Break in WordPress

Antes de começarmos, é importante saber que o espaçamento entre linhas é controlado pelo tema do WordPress que você usa.

Mostraremos como adicionar espaço entre os blocos no editor de blocos e, em seguida, abordaremos como alterar o espaçamento entre linhas em seu tema se você não estiver satisfeito com os resultados.

Tutorial em vídeo

Subscribe to WPBeginner

Se você não gostar do vídeo ou precisar de mais instruções, continue lendo.

Adição de espaço de linha dupla entre blocos

Quando você pressiona a tecla Enter no Windows ou a tecla Return no Mac em seu teclado para adicionar uma quebra de linha, o WordPress a considera como um novo parágrafo.

Isso significa que ele adicionará automaticamente o espaço entre linhas duplo, desde que seu tema tenha o estilo para isso (todos os bons temas do WordPress têm).

Adding double line spacing in WordPress

Basta acessar o editor de conteúdo, pressionar a tecla Enter ou Return após a linha e, em seguida, digitar outra coisa na próxima linha.

Ao fazer isso, com base no estilo do tema, você verá uma distinção clara entre os parágrafos.

Double line space added to create paragraph in WordPress

Adição de espaço de linha única

Agora, se você estiver escrevendo algo como um endereço, provavelmente desejará que ele tenha um espaço simples em vez de um espaço duplo no seu site WordPress.

Single Space Preview

Nesse caso, você precisa pressionar a tecla SHIFT + ENTER no Windows ou a tecla SHIFT + RETURN no Mac.

Isso dirá ao WordPress que você deseja iniciar uma nova linha dentro de um parágrafo existente. Portanto, ele precisa de espaçamento de linha única em vez de espaçamento de linha dupla.

Modificando a altura e o espaçamento da linha

Às vezes, mesmo quando você adiciona o espaçamento de linha adequado no editor, ele não é exibido da forma desejada no tema.

Há duas maneiras de corrigir isso:

  1. Usando um plug-in (a maneira fácil)
  2. Manualmente com código CSS (mais avançado)

Vamos dar uma olhada no método fácil primeiro.

Adição de espaçamento entre linhas usando um plug-in

Se você quiser fazer alterações de estilo em seu tema sem precisar aprender a programar, usar um plug-in como o CSS Hero é a melhor maneira de fazer isso.

O CSS Hero facilita a alteração do design do seu site WordPress sem conhecer nenhum código.

Add paragraph spacing in WordPress with CSS Hero

Você pode ver mais detalhes em nossa análise completa do CSS Hero.

Se você quiser fazer alterações maiores em seu tema, como mover uma barra lateral ou adicionar um rodapé, um plugin de criação de páginas do tipo arrastar e soltar seria uma opção melhor. Um plug-in de construtor de páginas também permite que você faça pequenos ajustes, como alterar as cores das fontes ou adicionar quebras de linha no WordPress.

Não quer usar um plug-in ou precisa fazer apenas uma alteração? Então, a opção de código CSS manual pode ser a melhor para você.

Alteração manual do espaçamento entre parágrafos com o código CSS

Para adicionar quebras de linha manualmente sem um plug-in, você precisa adicionar algum CSS ao seu tema.

O CSS é basicamente como o recurso de formatação do Microsoft Word. Em vez de clicar em botões, você escreverá um código CSS simples. Isso não é tão assustador quanto alguns iniciantes podem pensar. O CSS é muito fácil de entender se você estiver apenas seguindo as instruções.

Para adicionar CSS personalizado ao seu tema, você precisa visitar a página Appearance ” Customize (Aparência ” Personalizar ). Isso abrirá o personalizador de temas do WordPress, onde você precisará clicar na guia “Additional CSS” (CSS adicional) na coluna da esquerda.

Se não conseguir ver essas opções de menu, talvez você esteja usando um tema de bloco. Consulte nosso artigo sobre como corrigir a falta do personalizador de temas no painel de administração do WordPress.

Adding your custom CSS

Na caixa CSS personalizado, você precisa adicionar o seguinte código CSS:

.post p{line-height: 1.5em;}

A regra CSS mostrada acima alterará o espaçamento entre linhas do conteúdo do parágrafo para 1,5em. Em é uma unidade de largura para tipografia.

Estamos usando a classe .post, que o WordPress adiciona automaticamente à área de conteúdo de todas as postagens para garantir que ela afete apenas as postagens e não os parágrafos usados em outros lugares.

Adding custom CSS to increase line height

Agora, isso só altera o espaçamento do espaçamento simples.

Se você quiser alterar o espaçamento entre parágrafos no WordPress (ou seja, espaçamento duplo), precisará adicionar preenchimento.

.post p { 
line-height: 1.5em;
padding-bottom: 15px;
} 

Sinta-se à vontade para ajustar os números de acordo com suas necessidades e adicionar espaçamento duplo em HTML.

Você também pode adicionar CSS personalizado ao seu site usando o plug-in WPCode. O plug-in facilita muito a inserção e o gerenciamento de códigos em seu site.

Para obter mais detalhes, consulte nosso guia sobre como adicionar CSS personalizado ao seu site WordPress.

Esperamos que este artigo tenha ajudado você a adicionar uma quebra de linha no WordPress. Talvez você também queira ver nosso guia sobre como iniciar um blog no WordPress e os melhores serviços de marketing por e-mail para pequenas empresas.

Se você gostou deste artigo, inscreva-se em nosso canal do YouTube para receber tutoriais em vídeo sobre o WordPress. Você também pode nos encontrar no Twitter e no Facebook.

Divulgação: Nosso conteúdo é apoiado pelo leitor. Isso significa que, se você clicar em alguns de nossos links, poderemos receber uma comissão. Veja como o WPBeginner é financiado, por que isso é importante e como você pode nos apoiar. Aqui está nosso processo editorial.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

O kit de ferramentas definitivo WordPress

Obtenha acesso GRATUITO ao nosso kit de ferramentas - uma coleção de produtos e recursos relacionados ao WordPress que todo profissional deve ter!

Reader Interactions

100 ComentáriosDeixe uma resposta

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Ralph says

    This was huge problem back in old creator. I never knew how it will look like and had to hit preview every couple of lines but i think with gutenberg it is way easier and i learnd to just use shift+enter. I do this automatically and almost without consciousness. Don’t know why but some websites don’t allow shift+enter only enter or not and then I’m like “WHY it is not working”!

  3. Colleen Cochran says

    I finally figured out the shift-enter thing for poetry single space lines, but when the post is published and emailed to followers, it loses formatting and all the lines run together. How do I fix that?

    • WPBeginner Support says

      You would want to check with the tool being used to send the notification for the styling for fixing that issue.

      Administrador

  4. jan van den hoed says

    Thanks for the explanation. One question though. How can i do the same thing on a smartphone. I’m editing my blog on the way and do not have a laptop available. i tried to do shift enter but that did not work

    • WPBeginner Support says

      If you’re using a page builder plugin they may have a different method for the single/double line spacing. Otherwise, it could be a plugin/theme conflict where you would need to disable your plugins and/or swap your theme to check

      Administrador

  5. Tim G says

    I would like to reduce the spacing between normal paragraph lines — IMHO, there is too much white space by default. I’d also like to add a half line at the end of a paragraph, rather than a full line: WordPress by default seems to just do the equivalent of a double carriage return which is rather twentieth century and doesn’t emulate what Word can do. Any ideas?

    • WPBeginner Support says

      You would want to reach out to the support for your specific theme and they should be able to tell you what CSS needs to be added to reduce your line spacing :)

      Administrador

  6. Jen says

    God bless you! I’m so grateful for you posting this with the CSS! Who knew that’s all it took for me to change the spacing! I’ve been looking for something like this for a long time! Thank you so much!

  7. Kathy says

    I am using the “shift” enter method but it does not allow for different size font when I do. Is there a work around?

  8. phil rooksby says

    I don’t have Additional CSS. I’ve tried all sorts of other ways to alter the paragraph spacing but nothing works, looks a real mess. Help please!!!

  9. Norm says

    Thank you for the help. I have been looking all over the place, and wanted to do it with a plug-in. You made it so easy. Again, thank you very much.

  10. Maria says

    Hello! I want to have a simple spacing between my paragraphs and even after pressing enter (for the double space), when I preview the draft nothing has changed (it’s still all one paragraph). Could anyone help?

  11. Rashmi says

    Hi
    I would like to modifying the Line height and Spacing. However there is no ‘editor’ icon ( Appearance » Editor) from theme’s CSS file.
    So, what can I do?
    Thank you for your reply!

  12. Donna says

    Thank you, thank you, thank you!

    I was in another html editor and could not figure out how to do single spacing.

    You saved the day! :)

  13. Gerard says

    Brilliant and what an eternal lifesaver.

    I was struggling with spacing on one of my client sites and absolutely amazing that you had the exact answer almost at your finger tips. I am now becoming a permanent subscriber

  14. LR says

    I am using the Pilcrow theme and I have no idea how to make the double space between paragraphs happen. Sometimes it happens in my posts but sometimes it doesn’t. When I look in the HTML file I don’t see any post p or padding. I only see the end result of what the post will look like and thats when I know the double spacing didnt work. Can I still go back and re-edit and fix it? Last but not least where you say to go from the appearance to editor menus i dont have those options.
    I have under appearance the following options: themes, customize, widgets, menus, header, background, AMP, Theme Options, Mobile.
    Please help.

    • WPBeginner Support says

      Hey LR,

      You can add the CSS by visting Appearance->Customize and then clicking on the Additional CSS tab in customizer. See our guide on how to add custom CSS in WordPress.

      If you believe it to be a theme issue, then try temporarily switching to a default WordPress theme. If the issue disappears, then you can ask your theme developer for support.

      Administrador

  15. Derek Cummings says

    My theme is broken, as in it doesn’t have the double spacing by default. The theme is stuck on the shift+enter mode in other words. So in relation to the following code:

    .post p {
    line-height: 1.5em;
    padding-bottom: 15px;
    }

    Is 15px a normal default double space? How many pixels should it be by default? Also doesn’t it matter where I put this code? Thanx!

  16. Femi says

    Thank you for the tip on the shift + enter. I never knew this for years. Your site has always been a rescue when I get stuck.

  17. Lyn says

    Hello: How do you get custom line spacing (say, 1.5em) for one instance on one page instead of changing the entire theme CSS? I see two other people have asked the same thing with no response, at least not that I found. Thanks!

  18. Cat says

    How about simply adding some text and changing the text colour to white (if the background is white)? This should make it possible to create and customise line spaces much easier (unless, of course, the background is a picture of something that cannot be matched with font colour).

  19. Michael Rich says

    Hi WPBeginner staff,

    I have a different question. I use Visual Composer and have added many Separator with Text dividers between my section headings on my homepage. I would like to make those text headings also be a link to that section.
    However everytime I add the link I lose the section identifying text that I had in the separator and it’s magically replaced with the default text saying “TITLE”.

    To try to make it a link I am adding a the linking code inside this bracket:
    [vc_text_separator title=”1950s CARS”]

    I am scratching my head so hard that I think I’m bald. Any help will get you a lifetime of gratitude!!!

    Thankyou,
    Mike

  20. Anthony Cooper says

    I am using the WordPress ‘Divi’ theme and found that if you press enter (or shift + enter) twice, in order to create a larger space, it is ignored. To get round this press enter once, type a character on the line, (it does not matter what), highlight it and change the font colour of the character to white and then press enter again; this results in the desired space between lines without having to edit the theme. The same applies to extra spaces in a line; enter as many characters as desired, highlight them and change their font colour to white and then carry on in the desired font colour.

  21. Christy says

    THANK YOU!! I Love you guys! So glad I found this site! I’ve almost literally been banging my head against the wall. If I knew how to insert emojis, this post would be covered with hearts and smiley faces. :-)

  22. Linda Paul says

    Oh yeah! You have just helped me solve a problem (forced single space paragraphs) that has vexed me for years!

  23. David M. Ebersole Sr. says

    I am a subscriber to WP Beginner.
    I had a question concerning entering Engineering data for my product on my site. Spacing in the tables appeared too large on the page. I searched WordPress support and all I saw was snippy responses to the question of single line spacing.

    Your the first to answer the question, and it obviously was correct. Thank You.

    Sincerely,

    Dave

  24. Mark says

    What about on Android. The latest update has forced a double spacing (new paragraph). Not very good for poetry writers. Is there any way to revert it back to single?

  25. Cheryl says

    I use Omega Theme and the control/enter does not work. Is there something else I can do. I cannot find post.p in the CSS file.

  26. Tina Gleisner says

    Thanks for the “shift” and enter for single line spacing as I’ve wanted to figure this out for years … and never got around to finding the solution.

  27. A. Lougheed says

    I’m searching everywhere for an answer … when I add a in the text editor, it is removed in the visual editor. Drives me crazy. Does wpbeginner have a recommendation?

    Should I add a plug-in to stop this?

    I tried a plugin years ago, but I had to go back and re-format every post.

    Any link with tutorial or advice is greatly appreciated!

Deixe uma resposta

Obrigado por deixar um comentário. Lembre-se de que todos os comentários são moderados de acordo com nossos política de comentários, e seu endereço de e-mail NÃO será publicado. NÃO use palavras-chave no campo do nome. Vamos ter uma conversa pessoal e significativa.