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

Så här ändrar du enkelt storleken på fonten i WordPress

Vill du ändra storleken på fonten på dina posts eller pages i WordPress?

Ibland kanske du vill göra en rad eller ett stycke större, eller så kanske du vill öka storleken på fonten på hela page.

I den här artikeln visar vi hur du enkelt kan ändra storleken på fonten i WordPress posts och themes.

How to change font size in WordPress

Varför ändra storleken på fonten i WordPress?

Genom att ändra storleken på fonten på din website i WordPress kan du förbättra läsbarheten av innehållet och göra det lättare för användarna att ta sig igenom det.

Dessutom kan du genom att öka storleken på fonten lyfta fram viktig information på din WordPress blogg.

Om du till exempel visar upp en affiliate-produkt på din site kan en ökning av fontstorleken hjälpa till att göra produkten mer notice. Det kan också göra innehållet mer läsbart för tittare som besöker din website via mobila enheter.

Med detta sagt, låt oss se hur du enkelt kan ändra storleken på fonten i WordPress.

I denna tutorial kommer vi att diskutera multiple methods, så du kan använda links under för att hoppa till den metod du väljer:

Video Tutorial

Subscribe to WPBeginner

Om du föredrar skriftliga instruktioner kan du fortsätta Läsa.

Metod 1: Hur man ändrar storleken på fonten med hjälp av headings

Om du letar efter ett enkelt sätt att ändra storleken på fonten med hjälp av headings, då är den här metoden något för dig.

Att använda headings i ditt content är ett bra sätt att fånga användarens uppmärksamhet med ett större font.

I de flesta WordPress themes är headings i ett större font än den vanliga brödtexten, vilket allow you att dela upp dina posts och pages i sections.

Headings är också bra för att förbättra sökmotorsoptimeringen av websites, eftersom search engines ger ordentliga headings större vikt än vanlig paragraftext.

Så här addar du en heading i standard WordPress Block Editor

Först måste du öppna ett nytt post eller en ny page i WordPress Block Editor.

När du är där klickar du på knappen ”Add Block” (+) högst upp till vänster på vyn för att öppna menyn för block.

Härifrån måste du hitta och lägga till blocket Heading på sidan / posten.

Add the heading block

Som standard kommer blocket att vara inställt på Heading 2.

Om du lägger till en underrubrik är det vettigt att klistra på alternativet ”Heading 2”.

Men om du vill ändra detta kan du helt enkelt clicka på insticksprogrammet ”H2” och välja en annan storlek.

Change heading from h2

Alternativt kan du också ändra storleken på heading med hjälp av blockinställningarna i den högra toolbaren på vyn.

Du kan även customize headingens färg, appearance, gemener med mera.

När du är klar, glöm inte att klicka på knappen ”Update” eller ”Publicera” för att lagra dina settings.

Heading settings

Så här lägger du till en heading i den gamla klassiska Editorn

Om du fortfarande använder den gamla klassiska Editorn i WordPress kan du add headings med dropdown-menyn Paragraph.

Välj först den text som du vill göra om till en heading med hjälp av din mus.

Klicka sedan på dropdown-menyn ”Paragraph” högst upp i vänstra hörnet och välj storleken på din heading. Du har nu utan problem ändrat storleken på fonten till en heading.

Choose heading in classic editor

Tänk dock på att den klassiska Editorn inte tillåter dig att ändra storlekarna och fontfärgerna för de olika Heading-stilarna.

Om du vill göra det måste du göra ändringar i ditt temas stylesheet (style.css).

Slutligen klickar du bara på knappen ”Update” eller ”Publicera” för att save your changes.

Metod 2: Ändra teckenstorleken på text i Block Editor

Om du vill ändra standard fontstorlek för texten i ditt Paragraph block, då är den här metoden något för dig.

Först måste du öppna en befintlig page/post i Gutenberg editor.

När du väl är där klickar du på ett Paragraph-block och växlar sedan till tabben ”Styles” från blockpanelen på höger sida av vyn.

Härifrån måste du välja en storlek på fonten från ”Typography” section.

Change the font size

Du kan välja alternativet Small, Medium, Large eller Extra Large efter dina behov.

Om du vill ändra tillbaka din text till originalstorleken kan du också göra det genom att clicka på den treprickiga menyn bredvid Typografiinställningarna.

Detta öppnar en new dropdown menu där du måste clicka på alternativet ”Reset”.

Reset font size

Förutom det kan du också add to drop caps, letter casing, spacing, appearance och mycket mer med samma dropdown menu.

Efter det klickar du bara på knappen ”Update” eller ”Publicera” för att lagra dina ändringar.

Tänk på att dessa alternativ inte är tillgängliga i den äldre klassiska Editorn för WordPress. Om du vill använda dem bör du fundera på att byta.

Metod 3: Ändra fontstorlek med hjälp av ett tillägg

Om du vill ändra storleken på fonten med hjälp av ett plugin, kan du använda den här metoden.

Först måste du installera och aktivera pluginet Advanced Editor Tools. Detaljerade instruktioner finns i vår guide för nybörjare om hur du installerar ett plugin för WordPress.

Vid aktivering ger pluginet dig mer control över fontstorlekar och textformatering, samt en rad andra funktioner. Det adderar ett new ”Classic Paragraph” block som har alla utvalda funktioner för formatering.

Efter aktivering, head till Settings ” Advanced Editor Tools page från WordPress admin sidebar.

Väl där kan du enkelt dra and drop formateringsfunktioner från ”Unused Buttons” section till ”Classic Paragraph” blocket.

Dessa funktioner omfattar fontstorlek, fontfamilj, kopiering, prenumeration, emotikoner, källkod med mera.

Add the font size field

När du har gjort det rullar du ner till ”Options” -sektionen och kontrollerar alternativet ”Font Sizes” för att få tillgång till ett större antal fontstorlekar.

Efter det klickar du bara på knappen ”Save Changes” för att spara dina inställningar.

Add more font sizes

Om du använder pluginet med Classic editor, måste du byta till ”Classic Editor” tabs från högst upp på sidan.

När du väl är där måste du vidta samma actions som i Block Editor.

Advanced editor tools classic editor font size

Se till att du klickar på knappen ”Save Changes” när du har gjort dina ändringar.

Nu, för att se plugin i action, måste du öppna en ny eller befintlig page / post från WordPress dashboard.

När du är där klickar du på knappen ”Add Block” (+) högst upp till vänster på vyn för att öppna menyn för block.

Härifrån hittar du och adderar blocket Classic Paragraph till page.

Add the classic paragraph block to the page

Du kan nu använda dropdown-menyn ”Font Sizes” för att ändra storleken på texten i blocket ”Classic Paragraph”.

Slutligen klickar du på ”Update” eller ”Publicera” för att save dina settings för post eller page.

Font size field

Metod 4: Ändra storleken på fonten på hela webbplatsen med WPCode

Om du vill ändra storleken på fonten på hela din website, då är den här metoden något för dig.

Du kan enkelt add to denna funktionalitet genom att infoga CSS-kod på din website med hjälp av WPCode.

Det är det bästa WordPress code snippet plugin på marknaden som gör det super enkelt och säkert att add to kod till din website.

Först måste du installera och aktivera pluginet WPCode. För detaljerade instruktioner, vänligen se vår Step-by-Step guide om hur man installerar ett WordPress plugin.

Note: WPCode har en gratis plan som du kan använda för tutorialen. Men om du uppgraderar till pro-versionen får du tillgång till fler funktioner som villkorlig logik, ett molnbibliotek med code snippets och mer.

Efter aktivering, head över till Code Snippets ” + Add Snippet page från WordPress admin sidebar.

När du är där klickar du på knappen ”Use Snippet” under alternativet ”Add Your Custom Code (New Snippet)”.

Add new snippet

Detta leder dig till sidan ”Create Custom Snippet”, där du kan börja med att ge en titel till ditt code snippet.

Därefter väljer du alternativet ”CSS Snippet” från dropdown-menyn ”Code Type” i det högra hörnet av vyn.

Choose CSS Snippet for font size code

Följ därefter upp med att copy and paste in följande custom CSS-kod i boxen ”Code Preview”:

p {
font-size:16px;
}

När du har gjort det lägger du bara till din önskade textstorlek bredvid raden ”font-size” i CSS-koden.

Det ska se ut så här.

Paste font size code

Därefter rullar du ner till ”Insertion” -sektionen och väljer läget ”Auto Insert”.

Din kod kommer automatiskt att aktiveras på din site vid aktivering.

Choose an insertion method

Slutligen rullar du tillbaka högst upp på sidan och togglar omkopplaren ”Inaktiverad” till ”Aktiv”.

Efter det klickar du på knappen ”Save Snippet” för att köra din kod.

Save font size code

Nu har du utan problem ändrat storleken på fonten på din WordPress site.

Bonus: Ändra textfärg i WordPress

Bortsett från storlek kanske du också vill ändra textfärgen på din website för att göra ditt content mer läsbart och visuellt tilltalande. Det kan också förbättra din varumärkesprofilering och hjälpa till att lyfta fram viktig information.

För att ändra textfärgen måste du öppna ett blogginlägg i block editor och välja ett Paragraph-block. När du har gjort det växlar du till tabben ”Styles” från blockpanelen och klickar på alternativet ”Text”.

Detta öppnar färgväljarverktyget där du kan välja en textfärg som du vill ha för innehållet.

Change text colors

Om du vill ändra textfärgerna all over the website, då kan du använda WPCode, som är det bästa WordPress code snippet plugin på marknaden.

Efter aktivering, besök bara Code Snippets ” + Add Snippet page från WordPress admin sidofält och klicka på ”Use Snippet” under ”Add Your Custom Code” alternativet.

Detta tar dig till ”Create Custom Snippet” page, där du måste välja ”CSS Snippet” som code type och sedan copy and paste följande kod i ”Code Preview” boxen:

p { color:#990000; }

Om du vill använda en annan färg för webbplatsens head, måste du använda väljarna h1, h2, h3 eller liknande.

Changing the text color using custom code

Slutligen clickar du på knappen ”Save Snippet” och togglar ”Inaktiverad” till ”Aktiv”.

Nu har du utan problem ändrat textfärgen på all din website. Detaljerade anvisningar hittar du i vår tutorial om hur du ändrar textfärgen i WordPress.

Vi hoppas att den här artikeln hjälpte dig att lära dig hur du enkelt ändrar storleken på fonten i WordPress. Du kanske också vill se vår guide om hur du använder customize fonts i WordPress eller vår lista över de bästa plugins för drag and drop page builder i WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Avslöjande: Vårt innehåll stöds av våra läsare. Det innebär att om du klickar på några av våra länkar, kan vi tjäna en provision. Se hur WPBeginner finansieras, varför det är viktigt, och hur du kan stödja oss. Här är vår editoriala process.

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.

Den ultimata WordPress-verktygslådan

Få GRATIS tillgång till vår verktygslåda - en samling WordPress-relaterade produkter och resurser som varje professionell användare bör ha!

Reader Interactions

177 kommentarerLämna ett svar

  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. sutarmaji says

    Thank you. Your explanation is clear. But, I cannot apply it to my editing activities. In my Block Editor and Classic Editor, there is no font size dropdown menu. It’s frustating. Can you help me?

  3. sarah says

    Hi there,

    thanks for this tutorial. I was trying to do the fourth method and wanted to change my H2 size. I copy and pasted the code into my custom CSS but when I change the px value nothing happens. The Size doesn’t change. Very annoying :O

    • WPBeginner Support says

      You may need to check with your theme’s support in case they are overriding your CSS

      Administratör

  4. David Johnson says

    In the new wordpress block editor, regardless of whether I give it a H1 or H4 heading, it doesn’t change the size of the font at all. Sure, in the editor the size changes, but when I publish, there is no size change for what the public sees.

    • WPBeginner Support says

      Your theme may have styling for your headings that make the text look the same. You would either want to edit it with CSS or reach out to your theme’s support.

      Administratör

  5. Jran says

    Hi, is there a way to set/change defaults with the Classic paragraph editor? So for example if you wanted each block of text to have size 14 in Book Antiqua, is there a way to keep as a preset instead of having to manually change every block or even line?

    • WPBeginner Support says

      For what you’re wanting, you would likely need to use the CSS method from this article to set the text how you’re wanting.

      Administratör

  6. Leslie Limardo says

    Hi there,
    I have the tiny mce advanced plugin. I added the font size to the selection but when i go to my pages, but doesn’t appear and I’ve clicked through all the options and don’t see where else to add it.

    • WPBeginner Support says

      You will likely need to reach out to your specific theme’s support and they should be able to assist with what could be preventing the changes.

      Administratör

  7. Yoshiko says

    Hello. Thanks for the posting. I have one question. If I want to enlarge a couple of words in one block, how can I do it?

    • WPBeginner Support says

      You would likely need to edit the paragraph using HTML to manually add the text changes to specific sections.

      Administratör

  8. Vaibhavi says

    Thank you so much for this! I was afraid I’d have to buy a premium theme to make such small changes. This helped tons! :)

  9. tonyalee says

    This was so helpful! The font on my site was so small. Quick question, is there a way to do this for lists in the block editor? I noticed they are still the same size after adding the code to my css editor.

  10. mousam says

    Thank you for this post. I use astra theme and have implemented the custom css method for paragraph.

    Thank you again

  11. M Santimi says

    Thanks for being a reliable source of factual information pertaining to wordpress.

    Would appreciate an easy way to change light grey fonts to a more easily readable black.

  12. Susan Narayan says

    Nice video, but I was looking for a way to decrease the size of the font in my post title. Any resources you could direct me to?
    Thank you.

  13. Gulzar says

    I was actually looking for something like TINY MCE, thanks for the help.
    You are doing a great job, keep it up!

  14. mod says

    Hi, I want to change the default wordpress font size. I tried to add it in additional css. But it did not work. Please suggest me what to do. Thanks

  15. Ryan G. Cullen says

    I want to add a tiny text at the right size of image like a source link refer to image from…

    Help me how can I do this?

  16. Habib Khan says

    Hey,
    I was confused about the size of font. What is the size of font you are using in wpbeginner

    Either way, Your articles are best keep it up!

    Cheers,
    Habib

  17. Elise says

    Hello!
    I tried to change the font sizes (body+headings) in CSS but wasn’t successful;

    Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over FTP.

    What should I do? Your comments would be greatly appreciated ☺️

    • WPBeginner Support says

      It would depend on where you are adding the code, are you under Appearance>Customize>Additional CSS?

      Administratör

  18. Victor says

    With the new version of WordPress, this does not work. I am not sure why the article lists as 4/19 because some comments are a lot older.

    • WPBeginner Support says

      The date updates even if we edit out typos, these methods should work with the classic editor and for the block editor, there is the option to change the font size in the paragraph’s block settings.

      Administratör

  19. Radoslav says

    My theme is Sydney The articles’ titles are too big in mobile. Is there a way to change them without coding and without plugins. I use Elementor.

    • WPBeginner Support says

      If you’re using Elementor, then it should have options to change the font size in the design options for what you’re using to display the post. If you’re not customizing your layout with Elementor it would require CSS or reaching out to the theme’s support.

      Administratör

  20. john felicetti says

    I want to change the site title font on my self-hosted wordpress site and cannot get a simple answer as to how to do that. can you help?

  21. Jim says

    In the video, at 28 seconds, the editor is shown. There are all kinds of tools in the button bar.

    My dashboard doesn’t have that editor. There are, in fact, no buttons at all, just a text box with giant text in it.

    So, how do I get access to a real editor like you have?

    Jim

  22. Keith Brian Johnson says

    What if you want to make the title smaller but the tagline bigger? Being able to dictate fonts and sizes of text in posts is great, but how about the title and tagline?

    • Darlene says

      My old WP theme appears to have coded Heading 1 in 12 pt font like normal text. I manually change each heading to 14 pt. But then the coding doesn’t say ”h1” which Google robots look for. If I use your plugin(which is cool) and change heading font sizes, will they still be labeled h1, h2, h3? Also, I don’t want to change fonts on pages already customized. Can I apply the plugin to blog posts only? Thanks.

  23. Danny says

    The use of px (or pt) in this Guide is not recommendable, because on small Screens like on Smartphones the font size is very small. Its better to use em.

  24. Andrew Oliver says

    I want to enlarge Excel spreadsheets in my posts. I snip them and upload them via Add Media. But I don’t see a way to increase the font size of these uploads.
    So…. I increased the font size in my spreadsheet and then snipped and uploaded the spreadsheet with the larger font – but it still appears as the original size.
    Is there any way to increase the font size in the post as it currently is too small to be easily read (there are several columns in my spreadsheet)?

    • WPBeginner Support says

      Hi Andrew,

      We are not sure we fully understand your question. If you are uploading your spreadsheet as an image file, then its dimensions will depend on your post container. Let’s suppose your post container or content area is 600px wide, then your theme will automatically shrink the image to fit in the container. You can also try selecting full size image before inserting it into your post.

      Administratör

      • Mylene says

        Hi, thanks for sharing, very useful indeed. Is there a way to also adjust the font size of the title, or maybe better done in CSS (and if so, how)? thanks again!

  25. jackson says

    I use tinymcv plugin to change the font size. but when i press enter and go to the next line the font size will be default value which is 9pt. How can I change the default value to 12pt.

  26. jitendra says

    Thanks for the post. But I want to know more… I want to make the bigger size of some special word in a sentence without any plugin. Special words in a sentence. e.g. we are doing in MS word. Can it possible? Hope your answer.

    • Pragati kumar sheel says

      Hi jitendra to do that open your text editor.

      and type ”font-size: 120%;”

      For example:

       Your text

      You can change the font % by any value. I hope it will help you.

  27. Brady says

    Thanks for the video and info, but I can’t change single lines of font sizes when writing a blog post.
    In Visual Editor when I select ”Heading 1” or ”Heading 2” it changes the entire entry, but I only need to change that one line. I have to double space to make that happen without changing everything else. But then the spacing is wrong because it doesn’t need to be double spaced. Please help. And is there any other way to change font by font size (11, 12, 14, etc) instead of the preselected ”Heading 1” ”Heading 2”, etc.? Because TinyMCE didn’t work for me. Thanks!

  28. veonescu ghe says

    What are you talking about, WordPress? Just make a simple option to increase the font size! Not widgets that don’t work with some themes or they work for one paragraph etc. Because the Paragraph tab give either too small a font, or weirdly formatted, hard to read. Why is it so hard to just add an option to increase the size wit a button?…

    • Theresa says

      Not kidding. This should not be this difficult. Every time I hit return it reverts back to the original size. Do I really have to select the font size for every single paragraph?

  29. Anna says

    Hi, first of all thank you for all the knowlege available on this site. It’s great !
    I followed instructions from this article, but I still can’t change to font size in headers. I installed both TinyMCE and Google fonts. I am able to change font styles but not the size.

    Thank you,
    Anna

  30. Chidi Anslem says

    Thanks for this great post. It worked for me. I can now edit font family, change font size, underline text, highlight text and even insert table. Thanks.

  31. Philip says

    I just updated my site and theme. I am having a weird issue of my woocommerce product titles having bigger fonts than they were before updates. i have tried custom css from other forums and wondering if maybe I can get an option here.. Kindly advise.

    • WPBeginner Support says

      Hey Philip,

      Have you tested your website with different browsers and devices to make sure that it is not an issue with your browser settings. After that try reaching out to your theme developer, they will be able to tell you whats changed in the new version or if there is a better way to solve this issue.

      Administratör

  32. Thomas says

    Is there a simple way to set a new default font size in WP?
    I have been manually setting to a larger font to improve readability but the theme doesn’t like it and tends to revert back to default whenever I press ENTER and also the paragraph headings don’t work when I’m inside text with the new size.
    I’d have thought this would have been one of the first features to include in WP themes. The current default font is very small and I find it hard to read.
    Thanks, Thomas.

    • WPBeginner Support says

      Hi Thomas,

      You can go to Appearance » Customize and click on the Additional CSS tab.

      Then in the CSS box on the left panel, add this CSS at the end of whatever text/code you see there.

      body { 
      font-size:16px; 
      }
      

      You will see font size change in the live preview. Don’t forget to click on the ’Save & Publish’ button on top.

      Administratör

      • Marcia says

        This is so ridiculous and why I’m having a hard time with WP. It should be just as Word. You highlight the text and select from 100’s of fonts. Why does WP make this so difficult for the lay person? Can this not be changed?

Lämna ett svar

Tack för att du väljer att lämna en kommentar. Tänk på att alla kommentarer modereras enligt våra policy för kommentarer, och din e-postadress kommer INTE att publiceras. Vänligen använd INTE nyckelord i namnfältet. Låt oss ha en personlig och meningsfull konversation.