Vous souhaitez ajouter un saut de ligne dans WordPress ou ajuster l’espacement des lignes entre les blocs ?
Dans la plupart des traitements de texte, vous pouvez facilement ajouter des interlignes en appuyant plusieurs fois sur la touche « Entrée ». Vous pouvez également créer des lignes à double interligne après les paragraphes à partir des options de formatage. Cependant, l’éditeur de blocs de WordPress ne dispose pas de ces boutons.
Dans cet article, nous allons vous afficher comment ajouter facilement un saut de ligne dans WordPress.
![Adding single or double line spacing in WordPress How to Add a Line Break in WordPress](https://www.wpbeginner.com/wp-content/uploads/2023/06/how-to-add-a-line-break-in-wordpress-og.png)
Avant de commencer, il est important de savoir que l’espacement des lignes est contrôlé par le thème WordPress que vous utilisez.
Nous allons vous montrer comment ajouter de l’espace entre les blocs dans l’éditeur de blocs, puis nous afficherons comment modifier l’interligne dans votre thème si vous n’êtes pas satisfait des résultats.
Tutoriel vidéo
Si vous n’aimez pas la vidéo ou si vous avez besoin de plus d’instructions, alors continuez à lire.
Ajout d’une double ligne d’espacement entre les blocs
Lorsque vous appuyez sur la touche Entrée pour Windows ou sur la touche Retour pour Mac sur votre clavier pour saisir un saut de ligne, WordPress le considère comme un nouveau paragraphe.
Cela signifie qu’il ajoutera automatiquement un double interligne, à condition que votre thème ait le style nécessaire (tous les bons thèmes WordPress en ont un).
![Adding double line spacing in WordPress Adding double line spacing in WordPress](https://www.wpbeginner.com/wp-content/uploads/2014/04/add-double-line-spacing.png)
Il suffit d’aller dans l’éditeur/éditrices de contenu, d’appuyer sur la touche Saisir ou Retour après la ligne, puis de taper autre chose à la ligne suivante.
En faisant simplement cela, en fonction du style de votre thème, vous devriez voir une distinction claire entre les paragraphes.
![Double line break added to create paragraph in WordPress Double line space added to create paragraph in WordPress](https://www.wpbeginner.com/wp-content/uploads/2014/04/doublespacepreview-1.jpg)
Ajout d’un espace d’une seule ligne
Si vous écrivez quelque chose comme une adresse, vous voudrez probablement que l’espacement soit simple et non double sur votre site WordPress.
![Single Space Preview Single Space Preview](https://www.wpbeginner.com/wp-content/uploads/2014/04/singlespacepreview.jpg)
Dans ce cas, vous devez appuyer sur la touche MAJ + ENTREE sous Windows ou sur la touche MAJ + RETOUR sous Mac.
Cela indique à WordPress que vous souhaitez commencer une nouvelle ligne à l’intérieur d’un paragraphe existant. Il faut donc un interligne simple plutôt qu’un interligne double.
Modifier la hauteur et l’espacement des lignes
Parfois, même lorsque vous ajoutez l’interligne approprié dans l’éditeur, il ne s’affiche pas comme vous le souhaitez dans votre thème.
Il y a deux façons de le corriger :
- Utiliser une extension (la méthode la plus simple)
- Manuellement avec le code CSS (plus avancé)
Examinons d’abord la méthode la plus simple.
Ajout d’un interligne à l’aide d’une extension
Si vous souhaitez apporter des modifications de style à votre thème sans avoir à apprendre le code, l’utilisation d’une extension comme CSS Hero est le meilleur moyen d’y parvenir.
La bannière d’accroche CSS permet de modifier facilement le design de votre site WordPress sans connaître le moindre code.
![Add paragraph spacing in WordPress with CSS Hero Add paragraph spacing in WordPress with CSS Hero](https://www.wpbeginner.com/wp-content/uploads/2014/04/add-line-break-with-css-hero.png)
Vous pouvez voir plus de détails dans notre avis complet sur CSS Hero.
Si vous souhaitez apporter des modifications plus importantes à votre thème, comme le déplacement d’une colonne latérale ou l’ajout d’un pied de page, un constructeur de page par glisser-déposer serait une meilleure option. Un constructeur de page vous permettra également de faire de petites modifications, comme changer la couleur des polices ou ajouter des sauts de ligne dans WordPress.
Vous ne souhaitez pas utiliser d’extension ou vous n’avez besoin que d’une seule modification ? Dans ce cas, l’option du code CSS manuel peut vous convenir.
Modifier manuellement l’espacement des paragraphes à l’aide du code CSS
Pour ajouter des sauts de ligne manuellement sans extension, vous devez ajouter du CSS à votre thème.
CSS est en quelque sorte la même chose que la fonctionnalité de mise en forme de Microsoft Word. Au lieu de cliquer sur des boutons, vous écrirez du code CSS simple. Ce n’est pas aussi effrayant que certains débutants peuvent le penser. CSS est très facile à comprendre si vous vous contentez de suivre des instructions.
Pour ajouter des CSS personnalisés à votre thème, vous devez vous rendre sur la page Apparence » Personnalisation. Cela lancera le personnalisateur de thème WordPress, où vous devez cliquer sur l’onglet » Additional CSS » dans la colonne de gauche.
Si vous ne pouvez pas voir ces options de menu, il se peut que vous utilisiez un thème en bloc. Veuillez consulter notre article sur la façon de corriger l’absence du personnalisateur de thème dans l’administration de WordPress.
![Adding your custom CSS Adding your custom CSS](https://www.wpbeginner.com/wp-content/uploads/2014/04/additionalcss.png)
Dans le champ CSS personnalisé, vous devez ajouter le code CSS suivant :
.post p{line-height: 1.5em;}
La règle CSS affichée ci-dessus modifie l’interligne du contenu des paragraphes en le portant à 1,5em. Em est une unité de largeur pour la typographie.
Nous utilisons la classe .post
, que WordPress ajoute automatiquement à la zone de contenu de tous les articles pour s’assurer qu’elle affecte uniquement les publications et non les paragraphes utilisés ailleurs.
![Adding custom CSS to increase line height Adding custom CSS to increase line height](https://www.wpbeginner.com/wp-content/uploads/2014/04/linehieghtcss.png)
Cela modifie uniquement l’espacement des caractères simples.
Si vous souhaitez modifier l’espacement des paragraphes dans WordPress (c’est-à-dire un double espacement), vous devez ajouter de la marge interne.
.post p {
line-height: 1.5em;
padding-bottom: 15px;
}
N’hésitez pas à adapter les chiffres à vos besoins et à ajouter un double espacement en HTML.
Vous pouvez également ajouter des CSS personnalisés à votre site à l’aide de l’extension WPCode. L’extension permet d’insérer et de gérer très facilement du code sur votre site.
Pour plus de détails, veuillez consulter notre guide sur la façon d’ajouter des CSS personnalisés à votre site WordPress.
Nous espérons que cet article vous a aidé à ajouter un saut de ligne dans WordPress. Vous pouvez également consulter notre guide sur la façon de démarrer un blog WordPress et les meilleurs services de marketing e-mail pour les petites entreprises.
Si vous avez aimé cet article, veuillez alors vous abonner à notre chaîne YouTube pour obtenir des tutoriels vidéo sur WordPress. Vous pouvez également nous trouver sur Twitter et Facebook.
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!
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!!!
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.
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?
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!
Hannah says
Wow. Didn’t know it was so easy. Thank you so much! This double space was driving me crazy!![:D](https://www.wpbeginner.com/fr/wp-content/plugins/classic-smilies/img/icon_biggrin.gif)
Christine says
Thank you! So much easier!
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!![:)](https://www.wpbeginner.com/fr/wp-content/plugins/classic-smilies/img/icon_smile.gif)
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
Elandre says
Thanks for all the WordPress tips. This site has helped me a lot with most struggles I had
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.
Administrateur
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!
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.
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!
Denise B says
I set the p margins to zero. In your CSS, it would be something like p {margins: 0; }
Los Hundlos says
Shift+Enter to avoid huge gap between lines in wysywig tinye mce editor in wordpress. Works !!!! Awesome!
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).
Tim says
Thanks so much! Life saver!
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
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.
Julie says
Brilliant tip! Thanks so much for this, you saved me from lots of headaches and hassle Anthony!
Robin Brinkler says
Remember that some search engines could treat « hidden » text like this as spam.
Ellen says
This was really helpful, thanks!
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.![:-)](https://www.wpbeginner.com/fr/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Christy says
P.S. ~ HA! I did NOT know that my little colon and parentheses would actually turn into a smiley. LOL
Linda Paul says
Oh yeah! You have just helped me solve a problem (forced single space paragraphs) that has vexed me for years!
WPBeginner Support says
Glad you found it helpful![:)](https://www.wpbeginner.com/fr/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrateur
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
WPBeginner Support says
Glad you found it helpful![:)](https://www.wpbeginner.com/fr/wp-content/plugins/classic-smilies/img/icon_smile.gif)
Administrateur
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?
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.
Becky says
Very helpful, thank you!
Adnan Khan says
Thanks, this most useful Tip for new wp user
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.
Ian says
Hi,
This worked for me but the CSS doesn’t do anything in my page…
Will says
Same thing happened to me. Is there an updated code to insert?
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!
WPBeginner Support says
Actually it is also removed from your comment.
Please see our guide on How to add special characters in WordPress posts.
Administrateur
Jessica says
Whats the code for adjusting line height for one single post?
Bharadwaj says
Thank you, Helpful
Samadarshi says
Thank you for such wonderful articles![:)](https://www.wpbeginner.com/fr/wp-content/plugins/classic-smilies/img/icon_smile.gif)
I was completely lost when I started wordpress but now I have a pretty basic idea
Thank u
Neal Umphred says
Thanks! This helped me tighten up my posts—except for the first paragraph in each post. For some reason, the lines appear to be double-spaced. Is there a snippet of code that I could add to Edit CSS that would allow me to tighten them?
Neal Umphred says
Thanks! Adding the snippet (.post p{line-height: 1.5em;}) to my Edit CSS made my text so much easier to read. Now, here’s my problem: the opening paragraph in each WordPress post has much larger line spacing than the rest of the paragraphs—and it is NOT affected by this piece of line-height code. Is there another snippet of code that I could add to Edit CSS that would tighten up those opening lines?
tiffany says
Thank you so much. Your site is remarkable. It has helped me so much. Subscribed!! Please keep up the great work!!
WPBeginner Support says
Thanks for the kind words. We are glad to help.
Administrateur
Joe Simmons says
Thank you! I didn’t know about the « shift+enter » thing either.
Debby says
Shift + Enter. Who knew it was that simple! Thank you, thank you, thank you!
Gamo Nana says
thanks for the single line spacing with SHIFT + Enter
Bob M. says
I’d like to thank you for this bit of wisdom (Shift+Enter) too!
JE says
Thanks for the tutorial. Although, how can I adjust single paragraph line spacing? I have a 3 word title, centered and stacked in 3 lines. All of the lines have different font size, so the line spacings are inconsistent. I’ve been looking for a way to easily adjust through a text editor tool or plugin.
Any ideas?
Syed Balkhi says
We just used a browser search box which you can find by pressing Ctrl + F
Mx says
Finding .post p you used a search box. Will you tell me how to find that search box? Thanx4
Jun Han says
This is very helpful.
Thanks.
http://www.digitalgrog.com.au/ says
it was my pet peeve until now ..thanks now i can space properly ..btw i made a list of hosts check itout
http://www.digitalgrog.com.au/australian/comparison-on-blog-web-hosting-for-australians/
Karen Surfy Mum says
Awesome!! I also have wanting to find out how to do this for ages!!! So simple when you know… cheers xxx
Widdershins says
Oiiiiiiiiiiii!!! I’ve been trying to find out how to do that for yonks!!!!![:D](https://www.wpbeginner.com/fr/wp-content/plugins/classic-smilies/img/icon_biggrin.gif)
Thankyouthankyouthankyou
fastow2012 says
« If you do not find the .post p tag, then simply create one. »
Where? should i just copy/paste it anywhere in the css file?
WPBeginner Staff says
preferably at the bottom of the css file.
Mx says
Sorry, but I still dont get where to place it. Is is possible to explain it more detailed? Thanx
James says
I’ve always wondered how to do this. Thanks for the training.
Valerie says
I’m not even a true « beginner » but there are gaps in my knowledge and you have just solved one of the most frustrating things about WP for this writer and Word user… Thank you for this and for all your fantastic info… I continue to learn great things from your posts and your site. Thanks and cheers to you!
kelly says
almost four years of blogging and finally!
so awesome, thanks!!