Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

240
Views
how can i add tabs, new line inside textarea content?

I am trying to develop a blogging website where I am writing a code for creating a blog page, here I am taking the blog content using a textarea and after writing the blog content user has to publish using the publish button.

so I have to write a code for this textarea where I need to give tabs in paragraphs and next lines and scrollbar is there any way to achieve this? so that when I will be published this, there will be a proper paragraph in a blog?

<section class="body-section">
    <div class="blog-wrapper">
        <span class="title">
            <input type="text" class="form-control form-control-lg" name="title" placeholder="Title for your blog" id="txtTitle">
        </span>
        <span class="txtareaBody">
            <textarea name="txt" class="form-control" placeholder="start writing your blog.." id="comment" rows="20" scrollable></textarea>
        </span>
        <span>
            <input type="file" placeholder="upload thumbnail image" formnovalidate name="imgUpload" id="ImgUpload" class="form-control">
        </span>
    </div>

</section>
about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

To provide tab in paragraphs use the tab property and define the tab size.This would provide the required spacing in the text area.Here I have provided the code for your reference . You can also refer the link provided to know more on inserting tabs and spaces in HTML:https://www.geeksforgeeks.org/how-to-insert-spaces-tabs-in-text-using-html-css/

<style>
.tab {
        tab-size: 2;
    }
    </style>
<section class="body-section">
    <div class="blog-wrapper">
        <span class="title">
            <input type="text" class="form-control form-control-lg" name="title" placeholder="Title for your blog" id="txtTitle">
        </span>
        <span class="tab">
            <textarea name="txt" class="form-control" placeholder="start writing your blog.." id="comment" rows="20" scrollable></textarea>
        </span>
        <span>
            <input type="file" placeholder="upload thumbnail image" formnovalidate name="imgUpload" id="ImgUpload" class="form-control">
        </span>
    </div>

</section>

about 4 years ago · Santiago Gelvez Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!