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

Come aggiungere un’interruzione di riga in WordPress (nuova interlinea)

Nota editoriale: guadagniamo una commissione dai link dei partner su WPBeginner. Le commissioni non influenzano le opinioni o le valutazioni dei nostri redattori. Per saperne di più su Processo editoriale.

Volete aggiungere un’interruzione di riga in WordPress o regolare l’interlinea tra i blocchi?

Nella maggior parte degli elaboratori di testo è possibile aggiungere facilmente uno spazio vuoto in più premendo alcune volte il tasto Invio. È anche possibile creare linee a doppia spaziatura dopo i paragrafi dalle opzioni di formattazione. Tuttavia, l’editor di blocchi di WordPress non ha questi pulsanti.

In questo articolo vi mostreremo come aggiungere facilmente un’interruzione di riga in WordPress.

How to Add a Line Break in WordPress

Prima di iniziare, è importante sapere che l’interlinea è controllata dal tema WordPress utilizzato.

Vi mostreremo come aggiungere lo spazio tra i blocchi nell’editor dei blocchi e come modificare l’interlinea nel vostro tema se non siete soddisfatti del risultato.

Video tutorial

Subscribe to WPBeginner

Se il video non vi piace o avete bisogno di ulteriori istruzioni, continuate a leggere.

Aggiunta di una doppia linea di spazio tra i blocchi

Quando si preme il tasto Invio per Windows o il tasto Return per Mac sulla tastiera per aggiungere un’interruzione di riga, WordPress la considera come un nuovo paragrafo.

Ciò significa che aggiungerà automaticamente il doppio spazio di riga, a condizione che il vostro tema abbia lo stile adatto (tutti i buoni temi di WordPress ce l’hanno).

Adding double line spacing in WordPress

È sufficiente andare nell’editor dei contenuti, premere il tasto Invio o Return dopo la riga e poi digitare qualcos’altro nella riga successiva.

Così facendo, in base allo stile del tema, si dovrebbe vedere una chiara distinzione tra i paragrafi.

Double line space added to create paragraph in WordPress

Aggiunta di spazio su una riga singola

Ora, se state scrivendo qualcosa come un indirizzo, probabilmente vorrete che sia a spaziatura singola anziché doppia sul vostro sito WordPress.

Single Space Preview

In questo caso, è necessario premere il tasto MAIUSC + INVIO su Windows o il tasto MAIUSC + RETURN su Mac.

Questo indica a WordPress che si vuole iniziare una nuova riga all’interno di un paragrafo esistente. Pertanto, ha bisogno di un’interlinea singola rispetto a un’interlinea doppia.

Modificare l’altezza e la spaziatura delle linee

A volte, anche quando si aggiunge l’interlinea corretta nell’editor, non viene visualizzata nel modo desiderato nel tema.

Ci sono due modi per risolvere il problema:

  1. Utilizzo di un plugin (il modo più semplice)
  2. Manualmente con il codice CSS (più avanzato)

Vediamo prima il metodo più semplice.

Aggiunta dell’interlinea con un plugin

Se volete apportare modifiche di stile al vostro tema senza dover imparare il codice, utilizzare un plugin come CSS Hero è il modo migliore per farlo.

CSS Hero consente di modificare facilmente il design del vostro sito WordPress senza conoscere alcun codice.

Add paragraph spacing in WordPress with CSS Hero

Per maggiori dettagli, consultate la nostra recensione completa di CSS Hero.

Se si desidera apportare modifiche più importanti al tema, come lo spostamento di una barra laterale o l’aggiunta di un piè di pagina, un plugin per la creazione di pagine con trascinamento è l’opzione migliore. Un plugin per la creazione di pagine consente anche di apportare piccole modifiche, come la modifica dei colori dei caratteri o l’aggiunta di interruzioni di riga in WordPress.

Non volete usare un plugin o dovete solo apportare una modifica? Allora l’opzione del codice CSS manuale potrebbe fare al caso vostro.

Modificare la spaziatura dei paragrafi manualmente con il codice CSS

Per aggiungere manualmente le interruzioni di riga senza un plugin, è necessario aggiungere alcuni CSS al tema.

I CSS sono fondamentalmente come la funzione di formattazione di Microsoft Word. Invece di cliccare sui pulsanti, dovrete scrivere del semplice codice CSS. Non è così spaventoso come alcuni principianti potrebbero pensare. I CSS sono molto facili da capire se si seguono le istruzioni.

Per aggiungere CSS personalizzati al tema, è necessario visitare la pagina Aspetto ” Personalizza. Si aprirà il personalizzatore del tema di WordPress, dove è necessario fare clic sulla scheda “CSS aggiuntivi” nella colonna di sinistra.

Se non è possibile visualizzare queste opzioni di menu, è possibile che si stia utilizzando un tema a blocchi. Consultate il nostro articolo su come risolvere la mancanza del personalizzatore di temi nell’amministrazione di WordPress.

Adding your custom CSS

Nella casella CSS personalizzato, è necessario aggiungere il seguente codice CSS:

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

La regola CSS mostrata sopra modifica l’interlinea del contenuto del paragrafo a 1,5em. Em è un’unità di larghezza per la tipografia.

Stiamo utilizzando la classe .post, che WordPress aggiunge automaticamente all’area del contenuto di tutti i post per assicurarsi che abbia effetto solo sui post e non sui paragrafi utilizzati altrove.

Adding custom CSS to increase line height

Ora, questo cambia solo la spaziatura della spaziatura singola.

Se si desidera modificare la spaziatura dei paragrafi in WordPress (cioè la spaziatura doppia), è necessario aggiungere il padding.

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

Sentitevi liberi di adattare i numeri alle vostre esigenze e di aggiungere la doppia spaziatura nell’HTML.

È inoltre possibile aggiungere CSS personalizzato al sito utilizzando il plugin WPCode. Il plugin rende molto semplice l’inserimento e la gestione del codice sul vostro sito.

Per maggiori dettagli, consultate la nostra guida su come aggiungere CSS personalizzati al vostro sito WordPress.

Speriamo che questo articolo vi abbia aiutato ad aggiungere un’interruzione di riga in WordPress. Vi consigliamo di consultare anche la nostra guida su come aprire un blog su WordPress e i migliori servizi di email marketing per le piccole imprese.

Se questo articolo vi è piaciuto, iscrivetevi al nostro canale YouTube per le esercitazioni video su WordPress. Potete trovarci anche su Twitter e Facebook.

Divulgazione: I nostri contenuti sono sostenuti dai lettori. Ciò significa che se cliccate su alcuni dei nostri link, potremmo guadagnare una commissione. Vedi come WPBeginner è finanziato , perché è importante e come puoi sostenerci. Ecco il nostro processo editoriale .

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.

Il kit di strumenti WordPress definitivo

Ottenete l'accesso gratuito al nostro kit di strumenti - una raccolta di prodotti e risorse relative a WordPress che ogni professionista dovrebbe avere!

Reader Interactions

100 commentiLascia una risposta

  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.

      Admin

  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

      Admin

  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 :)

      Admin

  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.

      Admin

  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. Los Hundlos says

    Shift+Enter to avoid huge gap between lines in wysywig tinye mce editor in wordpress. Works !!!! Awesome!

  19. 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).

  20. 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

  21. 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.

  22. 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. :-)

    • Christy says

      P.S. ~ HA! I did NOT know that my little colon and parentheses would actually turn into a smiley. LOL

  23. Linda Paul says

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

  24. 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

  25. 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?

  26. 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.

  27. 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.

  28. 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!

Lascia una risposta

Grazie per aver scelto di lasciare un commento. Tenga presente che tutti i commenti sono moderati in base alle nostre politica dei commenti e il suo indirizzo e-mail NON sarà pubblicato. Si prega di NON utilizzare parole chiave nel campo del nome. Avremo una conversazione personale e significativa.