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 addar du tabeller i WordPress-poster och pages (ingen HTML obligatorisk)

Genom att lägga till tabeller i dina posts och pages i WordPress kan du organisera data och göra informationen lättare för dina läsare att ta till sig. WordPress förenklar denna process genom att erbjuda enkla tools som inte kräver någon HTML-kodning.

Den här guiden visar dig hur du enkelt skapar och hanterar tabeller i WordPress. Du lär dig ej endast grunderna i att infoga tabeller utan även hur du förbättrar dem med avancerade funktioner som gillar sortering och search, alltsammans utan att behöva några tillägg.

I slutet av den här artikeln kommer du att ha fått kunskap om hur du effektivt använder tabeller för att förbättra presentationen och funktionaliteten i ditt content.

Adding tables in WordPress without writing code

Video Tutorial

Subscribe to WPBeginner

Om du föredrar skriftliga instruktioner är det bara att fortsätta läsa.

Skapa tabeller i WordPress Block Editor

WordPress gör det superenkelt att add to tabeller med hjälp av WordPress standard block editor.

Skapa helt enkelt en new post eller page eller edit en befintlig. När du är inne i content editor klickar du på symbolen ”+” för att add a new block och väljer sedan Table block.

Du hittar den under ”Text” section, eller så kan du skriva ”Table” i sökfältet.

Add table block

Därefter kommer du att uppmanas att välja antalet Column och Row som du vill ha i din tabell. Båda siffrorna är 2 som standard.

Oroa dig inte om du inte är 100% säker på det exakta antalet eftersom du alltid kan add to/ Remove tabellens Column och Row senare.

Table columns and rows

Du behöver bara enter antalet row och columns och clicka på knappen ”Create Table”.

Blocket genererar sedan din tabell och visar den på vyn.

Table preview

You can type in the table cells, and they will automatically resize based on the amount of content in each one.

Du kan ställa in det här alternativet på höger sida om du föredrar att dina celler ska ha fix bredd. Här kan du också add to en tabell header eller footer section.

Table options panel

Från panelen Settings kan du också växla till tabben Styling.

Your WordPress theme kanske erbjuder en massa stilar för tabellblocket, eller så kan du välja bakgrundsfärg och textfärg.

Table style and colors

Om du vill lägga till en new row eller column klickar du bara på en cell vid den punkt i tabellen där du vill lägga till den. Därefter klickar du på knappen ”Edit Table”.

Detta kommer att visa ett antal alternativ för att add to eller remove row och columns till your tabell.

Add or remove table rows and columns

Som standard är texten i Column i din tabell vänsterjusterad.

Du kan ändra detta genom att klicka inuti en Column och sedan klicka på knappen ”Change Column Alignment”:

Align table columns

Du kan också ändra inriktningen av hela din tabell inom posten eller sidan.

Klicka bara på knappen ”Change alignment” och välj ett alternativ från listan.

Table alignment

Obs/observera att dessa alternativ kan göra att din tabell visas utanför de normala gränserna för din post area.

Vissa kan se konstiga ut på din WordPress website, så vänligen previewa ditt post eller page för att kontrollera hur tabellen kommer att se ut.

Här är vår tabell inställd på ”Wide Width” som den ser ut på vår demo site:

Table live preview

Som du kan se sträcker den sig utanför vänster- och högermarginalerna i area post.

Tabellverktygen som är built-in i Gutenberg editor ger dig stor flexibilitet när det gäller att displayed dina tabeller. Du kan använda blocket Tabell för att visa data för läsarna i ett användarvänligt format.

Blocket har dock inte avancerade funktioner som gillar search filtrering, customomize sortering, och mer.

Dessutom kan du inte använda samma tabell på flera area på din website i WordPress, t.ex. widgetar i sidebar eller andra pages.

För att skapa avancerade tabeller måste du använda ett WordPress Table Plugin.

Skapa tabeller med hjälp av TablePress tillägg

TablePress är ett av de bästa WordPress tillägg för tabeller på marknaden. Det är ett gratis plugin och tillåter dig att skapa och hantera tabeller enkelt. Dessutom kan du editera din tabell separat och till och med add to ett stort antal row.

Om du använder den äldre klassiska WordPress Editor, som inte har tabellfunktionen, är TablePress det bästa sättet att add to tabeller i dina posts och pages.

Först måste du installera och aktivera TablePress plugin. För mer detaljer, se vår Step-by-Step guide om hur du installerar ett WordPress plugin.

Du kommer då att se ett TablePress menu-item i din WordPress dashboard. Gå till TablePress ” Add New för att skapa en ny tabell.

Tablepress add new

Du måste skriva in ett namn för din tabell och bestämma hur många rader och Column du vill ha. You can always add/remove table rows and columns later as well.

När du har lagt till tabellnamnet, raderna och Column, fortsätt och klicka på knappen ”Add Table” för att skapa din tabell.

Därefter kommer du att se en vy med information om ditt bord och ett area där du kan add to content.

TablePress Edit Table

Skriv helt enkelt in de data du vill ha i cellerna i din tabell.

Om du vill add to eller remove row och columns eller utföra sorteringar högerklickar du i tabellen. Då visas en menu med alternativ där du kan göra fler ändringar.

Right click table options

Avancerade alternativ, t.ex. ”Tabellmanipulering”, finns under area ”Tabellinnehåll”.

Härifrån kan du lägga till, ta bort och duplicera row.

Table manipulation options

I ”Table Options” kan du add to en header och/eller footer row, som inte kommer att sorteras in med data.

You kan också bestämma var tabellens namn och description ska visas:

Advanced table options

Slutligen kan du ställa in olika alternativ i ”Table Features for Site Visitors” section.

These settings allow you to create responsive tables that can be filtered, searched, and sortera efter yours läsare.

Table features site visitors

När you är nöjd med din tabell, click ’Save Changes’.

Efter det kopierar du Table shortcode. Du kommer att behöva den i nästa steg.

Nu, edit the post or page where you want to display the table and add the Shortcode block to the editor.

Add shortcode

Efter det, add shortcode du kopierade tidigare till Shortcode block.

Glöm inte att update eller save dina ändringar.

Å andra sidan, om du använder den klassiska editorn, lägger du bara till shortcode direkt i din post:

Shortcode in classic editor

Om du vill ändra din tabell i framtiden kan du gå tillbaka till TablePress i adminpanelen och göra ändringar. Din tabell kommer automatiskt att uppdateras i alla posts och pages där du har använt den.

TablePress allow dig också att importera data från kalkylblad och CSV-filer. Likes, du kan exportera TablePress-tabelldata till en CSV-fil, som du kan öppna med ett kalkylbladsprogram som gillar Microsoft Excel eller Google Sheets.

Vi hoppas att den här artikeln hjälpte dig att lära dig hur du lägger till tabeller i WordPress-poster och pages utan att använda HTML. Du kanske också gillar vår guide om hur man skapar en innehållsförteckning i WordPress och våra expertval för de bästa tillägg för tabeller 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

131 kommentarerLämna ett svar

  1. Syed Balkhi

    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. Harindu Perera

    How to show grid lines in TablePress???

  3. Lorraine

    Many thanks. This made things so clear.

  4. Can Erik

    Great article. Thank you very much. Easy to install and understand to use. Cheers!

  5. mangi khumakcham

    Good table plugin but not mobile friendly.
    The table right side get clipped in mobile view.

  6. Sany

    Hey

    Can someone show me, how I can create dynamic table?

    I am new to WordPress. I like to maintain a database of gadgets say phones. I want an interface for me as admin to enter the specs and a picture of the item. For users, they will have the option to filter by brand and also compare 2 or more of these gadgets in a table format. They should also query an item and see all the specs in a table format. Please advice as to how this can be easily managed or maybe you have an article already for this!?

    thanks

  7. Stephen Ainsworth

    Amazing people don’t know how to use

    and have to use a plugin. Sigh.

  8. Noman S Baranian

    That is nice thing to learn and gain.. nice blog

    • Thanks for this! Now, how do I...

      Please, other readers, don’t be to harsh with me (especially using the R word). I am very new to all of this and feel successful in creating my first table. Now, how do I change the look and feel of the text in the table? I am using it to link to materials contained further on the page and highlight important pieces.

      • a guy

        You need to use CSS. There’s a bit of a learning curve to all this (in your case, you might want to style the table, rows, table cells, paragraphs in table cells, links, hover effects etc etc), so only start if it’s really important.

    • Tablepress - warning

      I just lost a Table that I created using Tablepress. I don’t know how it was deleted, but I also just found out that there is no way to recover a deleted table. Since I don’t know how the table was deleted, I am worried about relying on Tablepress.

      • WPBeginner Support

        If you have a backup plugin in place then you can recover your table by restoring to an earlier backup.

        We don’t think it is a plugin issue.

        Administratör

  9. Lilli

    Great! Great! Just what I was looking for! Thanks a million :)

  10. David

    Is it me or Wordpress is retarded? I mean any WYSIWYG editor can do a table on the fly these days, but the biggest CMS can’t? I must be missing something here, but using a plugin or iframes is so much trouble for a simple table… I’ll code it myself.

    • Vituz Andersen

      David,- I am with you. I dont get it. My first HTML editor back in 1998 had tables…. how come it has become easy to make a CMS based website, but you cant make a table…. Hellooooooo!!

    • Mayur

      Hi David,

      I initially wanted to code it in myself, but wordpress kept formatting my table all over the place. Is there a specific was to use HTML in a page?

      Many Thanks

  11. Sirje Koop Palmqvist

    I copied a table from Word into Wordpress and the code is neat and clean. It works well. Now I want to try the same table with the FooTable plugin to make it responsive, althought it already is responsive in a way. Thought that a webdesigner keeps the material on the local computer anyway and thus can make changes in Word and replace the table in WP. This might be cheating but it works. Sirje

  12. Radu

    TablePress is an amazing plugin.

    Thank you for this post.

    Actually today I downloaded it and already donated some money to their team.

    Have a fantastic day everyone.

  13. Emily

    Use it with FooTable to make it Responsive. They both support each other. Perfect!

  14. Ernest

    Hi,

    Is there any way to remove the table lines from showing?

  15. Neal

    The problems with plugins like this is that if you ever abandon the plugin the content linked to that plugin is busted across your entire site.

    While very slick plugin I try to minimize my database dependency on them as much as possible.

    • WPBeginner Support

      Neal, you are right about that. However, TablePress uses custom post types for tables. This means your tables are stored in the database even if you deactivate the plugin. You can still export the data.

      Administratör

  16. Group Of Oceninfo

    Hello Wpbeginner Team,

    Is it possible to call script in same way ?

    For ex. I have 1000 different scripts for 500 different post.

    I want to call 2 table in each post and in that table Want to run script not text so Is it possible to call two scripts in table ?

  17. ore

    Thanks for this! what resources can I use to create a table in which my clients can log in and post the prices of items they want to either buy and sell and which remains visible to the public

  18. Balaji

    Thanks for helping me find the plugin.

  19. Rátkai Tamás

    I’m interested in adding a table to a form or page. So if a user goes to the page, he can add the Quantity in the cells and at the bottom of the form he can send the table to me.

    Basically it would be a really simple order page without any payment options.

  20. um

    how many table we can add in a wordpress without using plugin

  21. Pierre

    I’v been trying to insert a table in a blog post by using the tablepress plug in. Suddenly, the word Edit inside a pair of brackets has been appearing in the lower left corner of each page of my web site. I can’t get rid of it. Do you know how I can fix this?

    Many thanks!

    Pierre

  22. Jennifer

    Exactly what I needed to create my press page. You rock.

  23. Nouman Younas

    superb… i just install it after reading this post… i am having some issues when i go for mobile preview… lets see, overall great plugin and post (Y)

  24. sady

    How to add Subscribe form like yours??

    Thanks

  25. Alicia Rades

    Wow! I love this plugin. Thank you!

  26. Anil Anvesh

    Ok, I installed the plugin and used a short code to add table to post. Now my query is what google reads short code or table content? Is it seo friendly? Give me a linke to your post where you used this plugin?

  27. Andrew

    I like the plugin, but I cannot figure out how to customize the width/height of the columns/rows, or how to have a particular cell be only as large as the contents inside it. Is there any way to do this? Thank you.

      • reGz

        How to split a column in Combine cells?
        any idea?

        Thanks

  28. Sylvester

    Please, is the data entered using tablepress stored in MySQL tables?

    • Simon

      Good question, I’m interested in the answer too. Anybody knows. Thanks! I’ll see if I can check.

  29. Arnel leo Aranquez

    is there a way to use this plugin in viewing data from mysql?

    • WPBeginner Support

      No we don’t think it was written for that. However you can export a mysql table as CSV and import it in TablePress.

      Administratör

      • Lindberg

        It would be awesome if it could view any mysql tables in the database.. should be an easy thing to fix and increase usefullness of this plugin so much

  30. Helen Edwards

    How do I remove the ”Show xx entries” at the top of the table and ”showing 1 to 6 of 6 entries” at the bottom?

    • Emily

      Actually it is out there when you add row and table. The setting is just below it. Look carefully.

  31. Jaya

    Hi,
    how can i use the tablepress form in my post section to particular user can able to add tables using copy, import files… Please help me to use…Thank you.

    regards
    Jaya

  32. Bamboo

    This is a huge time saver. Thank you!

  33. Amanda

    This is a great plugin. i have one question – i nee ot make the font bigger for the info that’s in my table. is there any way to do this other than entering code for each cell individually?

  34. Amy

    So which WordPress version are you writing for? WordPress.com or WordPress.org, because I can’t find the plugin option on my dashboard. You really should specify this … now I’m back to writing code by hand after getting my hopes up.

    • Editorial Staff

      All articles on WPBeginner are written for self-hosted WordPress

      Administratör

  35. Jimi Mikusi

    Wow.

    I’m not easily impressed but this managed to do it.
    Within minute after adding the plugin I had a visual pleasing and easily maintainable table on my site.

    Thanks!

  36. Eddu

    Love this plugin.
    Tried to style the table with Headway. No luck so far. Did someone else tried also? Would be great if it would be possible to do so.
    Again, great plugin :-)

    Ed.

  37. William Lower

    What a treasure this was to find! This non-programmer was having a serious non-day trying to create tables with code.

  38. Chrissy

    Thanks for this ! Ive been searching the web trying to find a solution because I see all these awesome pricing tables on websites and Ive been using the TinyMCE plugin, which works but its not what I am really needing. Thanks again you guys rock

  39. Vickie

    Thanks for another very useful post!
    Please does anyone know if it is possible to add code into a cell? I need to add paypal code into a table but not sure the best way to do it?

    • Jeff Cohan

      Did you try simply pasting the code into the cell?

  40. Yvonne Finn

    Thanks so much for this relatively simple to use plugin. It has saved me from much frustration as I am no techie and don’t actually want to spend hours doing what can be done with a plugin.

    I tried some of the other plugins for creating tables and was not impressed with their user-friendliness or lack thereof.

    Much appreciation!
    Yvonne

  41. Jon Mason

    THIS is a work of art! Nicely done and it is responsive too!

  42. M.Aswad Mehtab

    Thanks for This post very helpful for those who are not good with html and css !!

  43. David

    This looks like Tables Reloaded, which we use on some sites. However, it looks easier to use and manage. How well does it work with caching plugins like w3 total cache?

    • Editorial Staff

      This is the successor of WP Tables Reloaded plugin worked on by the same developer (Tobias). Tobias also commented on this post saying that the next version will be compatible with W3 Total Cache.

      Administratör

  44. Jeff Cohan

    Absolutely agree: TablePress is THE BEST plugin for creating tables in WordPress (IMHO).

    Just a few things to add:

    1) TablePress is the successor to what USED TO BE the best plugin for creating tables in WordPress: WP-Table Reloaded (now retired). Both are the work of developer Tobias Bathge.

    2) Tables built with WP-Table Reloaded can be migrated to TablePress.

    3) Tobias’ support is extraordinary. When I first used TablePress in November of 2012, I encountered a bug in the HTML import function and reported it in the support forum at WordPress.org. Within an hour, Tobias published a fix to Github. But don’t take my word for it. Check out the support forum.

    Jeff Cohan

  45. Keith Davis

    Thanks Guys
    This could be the table plugin for me.

    In the past I’ve created tables in Dreamweaver then cut and pasted the code.

    I’ll throw out a few tweets on this one.

    • Editorial Staff

      Keith, this is by far the best one we found so far as well. Totally appreciate the social media love that you send us :)

      Administratör

  46. Jason

    I just got this plug in last week as an alternative to using google docs iframe functions. This works great and allows a client to update the table without updating the pages or posts. I did find that you have to make sure you empty the caches if you are using the W3 plugin, or else you will get a cached version of the table. Great write up.

    • TobiasBg

      Great to hear that you like the plugin!
      What you say about caching plugins, like W3 Total Cache, is true. Good thing though: The next version of TablePress will automatically clear the W3 Total Cache page cache, to make sure that all shown tables are up-to-date :-)

      Best wishes,
      Tobias
      Author of TablePress

  47. Rod Salm

    Seems odd to put a table creating tab in the main Wordpress menu. The menu is supposed to be for top level functions. It seems that it should be in tools maybe, or in the post menu, where you select the tables, have the table making function accessible in the edit functions. Most times people are creating tables in posts and pages and would need to edit the table as well as the data within it.

    Having said that, it’s a pretty slick table maker.

    ­Rod Salm

    • TobiasBg

      I agree that the main menu is not always the best option, like when you only maintain a few tables once in a while. So, I made this an option :-) In the TablePress Plugin Options, you can actually choose where you want the TablePress menu entry to appear. Moving it to ”Tools” or ”Posts” is no problem with that :-)
      (The predecessor of TablePress put its menu under ”Tools” by default. I then however got questions from users who couldn’t find it, after activating it. That is why TablePress will sit in the main menu by default.)

      Best wishes,
      Tobias
      Author of TablePress

    • Artem Russakovskii

      You can change the placement in the plugin settings.

    • Editorial Staff

      Not odd at all. It is done for organizational purposes similar to contact forms, sliders, etc. By doing it this way, you can easily go to the menu and look at all the tables you have ever created rather than searching through the individual posts.

      Administratör

  48. Blograzzi

    This is good. I use it. But I want to ask something. What if i have 7 column and 10252 rows excel table?

    • Editorial Staff

      10,000 rows? Why in the world would you want that to be part of your blog post? Attach it as a separate file, so those who want to download it can do so if they like. It would freak the user out to see how long the page is if you have that many rows.

      Administratör

    • TobiasBg

      As the editorial staff pointed out already, there are better methods for such large tables, like offering a download, or using a custom PHP/mySQL solution.
      You can certainly try using TablePress with a table of that size, but I don’t really recommend it. It should work, but it will probably be slow, especially on the ”Edit” screen of the table.

      Best wishes,
      Tobias

  49. ivica

    Absolutely THE best table WordPress plugin at the moment. I tried them all, and this one is the most robust/powerful and yet at the same time the most simple to use. Good choice! :-)

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.