rmarkdownright-align

left align not working in Markdown html output document R


I have a shiny application with a fluidRow divided into 3 columns. I have text in the first and third column and an image in the second (middle) column. The text in the first and the third column are written in the Markdown files with output: html_document:.

I need the text in the first column to be aligned to the right side i.e. towards the image in the second column. I tried the below, which did not work.

`<p align = right>

 <h5>my heading bla bla</h5>
 <h6>my text bla bla</h6></p>`

and

 `<right>

 <h5>my heading bla bla</h5>
 <h6>my text bla bla</h6></right>`

None of these two ways is changing the alignment. It did not work even when tried to align left and it works only to align center.

What could be wrong here? any help?


Solution

  • Wrap the text using div tags:

    My text aligned to the right:
    
    <div align="right"> 
    <h5>my heading bla bla</h5>
    <h6>my text bla bla</h6></p>
    </div>
    

    enter image description here