How to center a link or a button ?

Undraw Animating

How to center a link or a button ?

About

This how to will show you how to center a link.

A link can be styled via its properties and because a link is a also a type of button, this page shows you the two possibilities.

A link is a phrase component but you may want to emphase it as a call to action by centering it.

You can center a link with the align attribute.

Example:

[[:docs:content:link?align=center|Go to the link page]]

A link is also a button type

Example:

  • Button as link
<btn link align="center">[[:docs:content:link|Go to the link page]]</btn>
  • Or as a plain button
<btn align="center" width="fit-content">[[:docs:content:link|Go to the link page]]</btn>
Task Runner