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

130 kommentarerLämna ett svar

  1. Dennis

    Cannot add table to latest version of WORDPRESS

    There is no +

    • WPBeginner Support

      The + is still in the current version of WordPress, if you are using a builder or similar tool instead of the block editor, that is the most common reason why you would not see it.

      Administratör

  2. Ralph

    I use wordpress default tables and while they work great on desktop browser, on the phone everything is messed up. It only allow like 10 characters max and turn nice table into rubbish.
    Is there a way to do something with it? Like not squish but scale? Table would be smaller but readable or the same size but we can swipe it?

    • WPBeginner Support

      It heavily depends on how your table is organized, you may want to look into TablePress for more control over the tables.

      Administratör

  3. Shafi

    Is there a way to show html without it being rendered in the front-end ? like i wanna show in the table cell, and i want the output as however, the table is treating it as if there’s an image. How do i solve that

    • WPBeginner Support

      It would depend on the method used but in your toolbar when you have a cell selected you should have the option of setting it as inline code for what you’re wanting to do :)

      Administratör

  4. Warren Contreras

    The table is exactly what I need, but only if you can input number and display a column sum in the botom row,

    • WPBeginner Support

      For what you are wanting, you would want to use TablePress :)

      Administratör

  5. Yemi

    Is there a way to break the long table into pages whereby users can click next

    • WPBeginner Support

      To separate the content in your tables into different pages, you want to use TablePress and its pagination options.

      Administratör

  6. Anita

    The background colors don’t work because you need to backspace the quotations and type in your own quotations. I found it by accident. If someone else has already figured that out my apologies but I wasn’t going to go through over 100 comments to check.

    • WPBeginner Support

      Thank you for sharing that should someone run into the background color not working for them :)

      Administratör

  7. Andre Victor

    Hi. I have an existing table with data of 6 columns and 750 rows. It would be difficult to re-type into blank table in Wordpress page. Please advise how I can either import the entire table (can be Excel or Word) or copy and paste the cells’ contents into blank table.

    • WPBeginner Support

      You would want to take a look at TablePress and the import options available to bring in your table.

      Administratör

  8. Margaret

    Hi! I am wondering if it is possible to simply copy->paste a table from an existing document into WordPress? I have tried this and it doesn’t appear to work, but I am wondering if there is a trick to it that I am missing. Thanks!

    • WPBeginner Support

      It would depend on the document but we would normally recommend recreating the table in WordPress

      Administratör

  9. Nicole

    Hi! I want to learn more about WordPress!!

    • WPBeginner Support

      Our site should be able to help you then :)

      Administratör

  10. Jim Gharib

    Classic editor does have table functionality and a plugin is not needed when using that editor. Check it out.

    • WPBeginner Support

      You would need to use a plugin to enable the classic editor and normally that would require using HTML :)

      Administratör

  11. Matthews Otalike

    Oh my word, thanks for the guidance on creating tables on WordPress and other resources you have been availing to us. Kudos to you.

    • WPBeginner Support

      You’re welcome, glad our guide was helpful :)

      Administratör

  12. TheFrugalChoice

    Helpful post that I can use in my personal finance and financial independence blog.

    • WPBeginner Support

      Thank you :)

      Administratör

  13. Monique Robinson

    Great article and great plugin. Straight and to the point. Thanks very much.

    • WPBeginner Support

      Glad you liked our article :)

      Administratör

  14. Annapurna agrawal

    Hi
    I have installed the tablepress plugin.

    i have issue for user capability. In the user role plugin, i haven’t granted permission to ”edit_other_user_tables”. But my contributor user role can still edit other’s table and delete it as well.

    How should i avoid access to other’s table?

    • WPBeginner Support

      You would want to reach out to TablePress to see if there is a built-in or recommended method for preventing editing of other tables.

      Administratör

  15. Nabil Nawaz

    Great article.. how can we make parent child in this ? like 1st column’s 1st cell is parent cell and next to it we have information for it’s child info.. like three rows are need to be explained for that 1st cell next to it

  16. sumit kumar gupta

    Sir when we click on the TablePress option in Visual editor then only list of table is showing in front of me. No Table creation option is available in Visual Editor. What should I do for create a new table in Post editor?

  17. Wyce Ghiacy

    Thanks for the video.

    What would you recommend to embed a formatted Excel sheet and collect data from registered WP users? (Like monthly usage reports, and the excel sheet also calculates the quarterly/yearly usage)

  18. Louise Wooding

    HI

    Thank you for the video. I have created my table and chose Insert Image in one of the cells. It did let me choose the image but it then entered the URL to it rather than the image itself. Have I missed out a step??

    Thank you.
    Louise

  19. Tom Cullen

    Awesome Share, thank you!

  20. Owolabi

    This is a nice article boss.
    Thanks for sharing.
    But I do have a question.
    Is there no plugin I can install that can bring the insert table option into the icons on my wordpress post?
    Thanks as I await a reply

  21. Ravi Kanani

    I want to add a table of specification in which first column is same for all post and second column is different.
    How can I add this type of table in post??

  22. Susan Hawthorne

    It would be very nice if, in the article about TAblePress it said that you have to upgrade to a business plan to use a plugin!!!!!!!!!!!! :(

  23. Barbara

    Is there any way to bold some lines of text in the table? Its all plain text, wish there was an easy way to add bold text

    • Abee

      just add an html text at the word

      • Michael Carter

        Actually, you can use CSS if you are ok with it. Use The words you want to emphasize …

  24. banks dada

    Thanks a million for this plugin. All i needed was to prepare the list on excel and import it into wordpress.
    Sweet and time saving tool.

    Bless you guys for this piece

  25. Sadha

    Hi, I would like to create links in the table that forward to another page and pass the row number through or any field from the row. How would I do this?

    Options I can think of which are not straight forward
    1) Use localStorage\sessionStorage
    2) Pass the value in the URL but then the next page needs to read this on load – maybe not a bad idea ?

  26. Molly Greger

    Wow! such a fantastic tool!! BUT: the colors are so pale I cant see a thing?? How can I change the colors fo rows/columns?

  27. varalakshmi

    Thank you……This is helpful to me up to some extent. I satisfied with your post.

  28. Alex Nicholson

    Think this only works for users of Wordpress.org. Is there any similar guide for those like me who use Wordpress.com especially where I can use a coloured background to the cells in a table?

  29. Ray

    Hello
    I was trying to make an interactive table similar to this that would use a query picking data from a database.
    I am using wordpress with a mysql/phpmyadmin database.

    My query works in phpmyadmin but does not show values in wordpress?

    SELECT * FROM `MyTablename` WHERE 1

    Do i need to use a list or print command or database name?

    • Jhon Carl

      I am having the same issue with you. Did you find a way to this already?

  30. Carolyn

    I would definitely recommend this plugin. A reminder to blogger when moving from one hosting service to another: don’t forget to back up the tables. There’s no way to recover the data. And if you know how can you share the info.

  31. Dimitar

    I recently was struggling to figure out how to add good-looking tables so this will be very helpful, thank you for publishing this.

  32. Omar Khan

    How to create tables on tag/category page

  33. Paco Gimenez

    Hi guys,
    Thank you very much for support.
    This tablepress is interesting.
    I was looking a system to do something like that:
    In i have a table with some information and colums. table1 for example.
    I want when i press some region in my map, i can load an url, like /map#section

    Can i do something like load same table in another order? by some colum o something? instead of click in a column, click in a region and load the same url but with the ”#” of this table in the order required.

    Thank you very much for support.

  34. Ben K

    Thought about updating the screenshots on this article?

  35. Divine

    Thanks WP. You guys are the best! 4.5stars

  36. Arindam

    Thanks for the info. I was wondering if the shortcode will have any SEO value. Is it likely that a table displayed with a shortcode will appear in Google Featured Snippet?

  37. Harindu Perera

    How to show grid lines in TablePress???

  38. Lorraine

    Many thanks. This made things so clear.

  39. Can Erik

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

  40. mangi khumakcham

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

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

  42. Stephen Ainsworth

    Amazing people don’t know how to use

    and have to use a plugin. Sigh.

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

  44. Lilli

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

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

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

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

  48. Emily

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

  49. Ernest

    Hi,

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

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

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.