In WordPress, I want to run a loop to get posts in tabular format

Below code is to display the Posts provided you have to pass the $args so that it will fetch all data for you in the loop.

It is mandatory to use bootstrap so that it will be easy for you to use the code for alignment.

<?php query_posts($args);
if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="col-lg-4 col-md-6 col-sm-12">
<div class="attachment_image">
<?php if ( has_post_thumbnail() ) : ?>
    <a href="https://wordpress.stackexchange.com/questions/276062/<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
        <?php the_post_thumbnail(); ?>
    </a>
<?php endif; ?>
</div>
<div class="post_title">
<h1><a href="https://wordpress.stackexchange.com/questions/276062/<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
</div>
</div>
<?php endwhile; endif; ?>
<?php wp_reset_query(); ?>

Example by Providing the $args over to the Code.

<?php
$args = array(
'post_type'=> 'posts',
'orderby'    => 'ID',
'post_status' => 'publish',
'order'    => 'DESC',
'posts_per_page' => -1
);
$results = new WP_Query( $args );
if ( $results-> have_posts() ) : ?>
<?php while ( $results->have_posts() ) : $results->the_post(); ?>
<div class="col-lg-4 col-md-6 col-sm-12">
<div class="attachment_image">
<?php if ( has_post_thumbnail() ) : ?>
    <a href="https://wordpress.stackexchange.com/questions/276062/<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
        <?php the_post_thumbnail(); ?>
    </a>
<?php endif; ?>
</div>
<div class="post_title">
<h1><a href="https://wordpress.stackexchange.com/questions/276062/<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
</div>
</div>  
<?php endwhile; ?>
<?php endif; wp_reset_postdata(); ?>