Mengatur Rata Kiri, Tengah, Kanan, dan Justify untuk Teks dan Gambar dengan Markdown

9925DB31-34FC-4B4B-9C41-4F46DBA2B078.jpeg

Markdown, alat editor yang tersedia di Steemit, mengizinkan penataan teks dan gambar dalam batas-batas tertentu. Kita misalnya, tidak bisa memperbesar atau memperkecil gambar. Ukuran dan jenis font juga tidak bisa diubah.

Tapi, Markdown mengizinkan penggunaan beberapa kode atau tag HTML secara terbatas. Dengan keterbatasan itu, kita masih bisa mengatur peletakan teks dan gambar.

Markdown mengizinkan pengunaan kode HTML <div>. Adapun nilai class yang diizinkan untuk dipakai adalah:

  • text-justify
  • text-rtl
  • text-center
  • text-right
  • pull-right
  • pull-left

TEKS

Rata Kiri

Rata kiri adalah default dalam Markdown. Tanpa kamu menambah kode apa pun, teks otomatis akan tersusun secara rata kiri. Makrdown juga tidak menyediakan tag atau kode untuk ini.

Rata Kanan

The Javanese artist, Raden Saleh's (c. 18 14-80), famous painting of the capture of Dipanagara at Magelang on 28 March 1830, has long been recognised as a work of unusual interest. Painted in 1857, after Raden Saleh's return to Java, it was presented to the Dutch King, William III (reigned, 1849-90),vas 'a token of thanks for his (Saleh's) education and training as an artist during (nearly) twenty-three years (1829-51) in Europe', a period when he had been largely supported at Dutch government expense and had received particular marks of favour from the Dutch royal family.[1]

Kode

<div class="text-right">The Javanese artist... Dutch royal family.</div>

Catatan: Teks dipotong untuk menonjolkan kode. Selanjutnya juga demikian.

Rata Kiri-Kanan/Justify

The Javanese artist, Raden Saleh's (c. 18 14-80), famous painting of the capture of Dipanagara at Magelang on 28 March 1830, has long been recognised as a work of unusual interest. Painted in 1857, after Raden Saleh's return to Java, it was presented to the Dutch King, William III (reigned, 1849-90),vas 'a token of thanks for his (Saleh's) education and training as an artist during (nearly) twenty-three years (1829-51) in Europe', a period when he had been largely supported at Dutch government expense and had received particular marks of favour from the Dutch royal family.

Kode

<div class="text-justify">The Javanese artist... Dutch royal family.</div>

Teks Kanan ke Kiri

Ini pengaturan khusus untuk bahasa yang cara bacanya dari kanan ke kiri, seperti bahasa Arab.

بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ

Kode

<div class="text-rtl">بِسْمِ اللهِ الرَّحْمٰنِ الرَّحِيْمِ </div>

Rata Tengah/Center

Dengan memakai kode <center>

The Javanese artist, Raden Saleh's (c. 18 14-80), famous painting of the capture of Dipanagara at Magelang on 28 March 1830, has long been recognised as a work of unusual interest. Painted in 1857, after Raden Saleh's return to Java, it was presented to the Dutch King, William III (reigned, 1849-90),vas 'a token of thanks for his (Saleh's) education and training as an artist during (nearly) twenty-three years (1829-51) in Europe', a period when he had been largely supported at Dutch government expense and had received particular marks of favour from the Dutch royal family.

Kode

<center>The Javanese artist... Dutch royal family.</center>

GAMBAR

Rata Kanan

Sebuah gambar dapat ditata agar berada di sisi kanan laman sehinggga teks akan mengalir di sisi kanannya. Sebaiknya gambar yang digunakan yang berukuran kecil atau lebih kecil daripada lebar laman.

The Javanese artist, Raden Saleh's (c. 18 14-80), famous painting of the capture of Dipanagara at Magelang on 28 March 1830, has long been recognised as a work of unusual interest. Painted in 1857, after Raden Saleh's return to Java, it was presented to the Dutch King, William III (reigned, 1849-90),vas 'a token of thanks for his (Saleh's) education and training as an artist during (nearly) twenty-three years (1829-51) in Europe', a period when he had been largely supported at Dutch government expense and had received particular marks of favour from the Dutch royal family.

Kode

<p>
<div class="pull-right">
<img src="<img class="markdown-img-link" src="https://steemitimages.com/0x0/https://res.cloudinary.com/hpiynhbhq/image/upload/v1519012354/dhjswdlnhrvpskaab8ch.png""/>>
</div>
The Javanese artist... Dutch royal family.
</p>

Rata Kiri

Pengaturan ini bekerja sebaliknya: gambar digeser ke kiri.

The Javanese artist, Raden Saleh's (c. 18 14-80), famous painting of the capture of Dipanagara at Magelang on 28 March 1830, has long been recognised as a work of unusual interest. Painted in 1857, after Raden Saleh's return to Java, it was presented to the Dutch King, William III (reigned, 1849-90),vas 'a token of thanks for his (Saleh's) education and training as an artist during (nearly) twenty-three years (1829-51) in Europe', a period when he had been largely supported at Dutch government expense and had received particular marks of favour from the Dutch royal family.

Kode

<p>
<div class="pull-left">
<img src="<img class="markdown-img-link" src="https://steemitimages.com/0x0/https://res.cloudinary.com/hpiynhbhq/image/upload/v1519012354/dhjswdlnhrvpskaab8ch.png""/>>
</div>
The Javanese artist... Dutch royal family.
</p>

Rata Tengah



Kode

<center>
    <img src="<img class="markdown-img-link" src="https://steemitimages.com/0x0/https://res.cloudinary.com/hpiynhbhq/image/upload/v1519012354/dhjswdlnhrvpskaab8ch.png""/>>
</center>

Catatan Kaki

1. Kutipan ini diambil dari artikel "Raden Saleh, Dipanagara and the Painting of the Capture of Dipanagara at Magelang (28 March 1830)" karya Peter B. R. Carey yang termuat di Journal of the Malaysian Branch of the Royal Asiatic Society, Vol. 55, No. 1 (242)(1982), hlm. 1-25. Teks untuk contoh selanjutnya menggunakan sumber yang sama.

FOTO: Sumber: Pixabay.com


55C8E69B-01A6-4628-A0E3-ED05BD9E1168.png

Semoga tulisan ini bermanfaat. Kalau Anda mendukung saya untuk menulis artikel-artikel semacam ini, tolong Upvote dan Resteem artikel ini. Silahkan pula follow saya @blogiwank.

Artikel Lain

Artikel KSI Chaterine Jakarta

H2
H3
H4
3 columns
2 columns
1 column
20 Comments