Magento Expert Forum - Improve your Magento experience

Results 1 to 9 of 9

How to align text on html

  1. #1

  2. #2
    Junior Member
    Join Date
    Feb 2018
    Posts
    113
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default

    To set text alignment in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML <p> tag, with the CSS property text-align for the center, left and right alignment.

    Corporate Gifts Suppliers in Delhi | Corporate Gifts Suppliers in Noida | Corporate Gifts Suppliers in Gurgaon
    Last edited by trzy; 21-02-2020 at 11:33 AM.

  3. #3
    Junior Member kajal's Avatar
    Join Date
    Sep 2014
    Location
    Bangalore
    Posts
    1,446
    Thanks
    0
    Thanked 20 Times in 20 Posts

    Default

    Hi Friends,
    With CSS, if you're doing it properly.

    Assume you have markup for an HTML table like this:

    <table>
    <tr>
    <td>Foo</td>
    <td>Bar</td>
    </tr>
    </table>

    You can align all text in the table with a CSS style targeting the entire table:

    table {
    text-align: center;
    }

    This is considered proper because we're using CSS to change the presentation of the content.

  4. #4
    Junior Member
    Join Date
    Jun 2019
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the informative data.

  5. #5
    Junior Member
    Join Date
    Sep 2016
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You can use code text:align for aligning text.

  6. #6
    Junior Member
    Join Date
    Feb 2018
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You can align a text using the following two ways: Using HTML tag; Using style attribute. You can always hire professional front end development services if you need to add something to your website. Front end languages include HTML, CSS, and Javascript.

  7. #7
    Junior Member
    Join Date
    Sep 2018
    Location
    United Kingdom
    Posts
    635
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    To set text alignment in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML <p> tag, with the CSS property text-align for the center, left and right alignment.

  8. #8
    Junior Member
    Join Date
    Sep 2018
    Location
    Oman, Muscat
    Posts
    2,084
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    To set content arrangement in HTML, utilize the style characteristic. The style characteristic indicates an inline style for a component. The quality is utilized with the HTML <p> tag, with the CSS property text-adjust for the middle, left and right arrangement.

  9. #9
    New member
    Join Date
    May 2021
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have the following HTML code and i want to make my form aligned in center.

    <form action="advsearcher.php" method="get">
    Search this website:<input align="center" type="text" name="search" />
    <input type="submit" value="Search"/>
    </form>
    How can I do that? Thanks in advance.

    ---------------------------
    Vintage Industrial Antique Drafting Tables with Cast Iron Base. Bring enduring style into your office with a Antique Drafting Table or desk.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •