Help:Tables/Wikitext

If you want to shape tables with wikitext, you have plenty of options. This one page won't go into them all, but it will show you how wikitext matches up to HTML markup, the difference a CSS class makes, and an example of a simple table that works on both desktop and mobile devices.

Basic table code
Wikitext is, in many ways, just shortcut for HTML. IF you're familiar with HTML, you probably already know how to build a wikitext table. You just may not know it yet. Here's a chart that will help you understand the connection between wikitext and HTML.

FANDOM's default CSS classes
Deep within FANDOM's code lie two classes that you can put at the very start of your table. No matter which wiki you're on, there is always some default formatting for .article-table and .wikitable. If you use either the VisualEditor or the classic editor's visual mode, .article-table will be automatically added so that the basic structure of your table will be. But there are cases where you might consider using .wikitable—or no class—instead. Here's what they all look like on a completely un-customized wiki:

Basic tables
As explained elsewhere, tables don't always display well on mobile web.

The best approach is to keep things as simple as possible. Look at the following wikitext, and then notice, on your phone, how the table works on that smaller display: ...which gives:

More advanced table coding
Tables can be made significantly more advanced than the example above. If you want to explore other options for wikitext tables, you could start by consulting the MediaWiki help page for tables. But remember that much of what you'll see in places like mediawiki.org or Wikipedia's help page don't really consider the effects of tables in mobile. It's important to always check your work with tables on an actual phone to see how well it displays for the many mobile readers of your wiki.

Further help and feedback
de:Hilfe:Tabellen/Wikitext es:Ayuda:Wikitexto/Ejemplos de tablas ja:ヘルプ:テーブル/ウィキテキスト ru:Справка:Таблицы/викитекст pt:Ajuda:Wikitexto/Exemplos de tabelas ko:도움말:위키 문법/표 예제 zh:Help:Wiki文本/表格的例子