How to align table in HTML?

Asked

Viewed 63 times

-3

Just doesn’t go along

<Doctype html>
<html>
    <head>
        <title>Revisão</title>
        <meta charset="utf8"/>
    </head>

    <body>
         <table aling="center" border="1">
            <div>            
                <tr>
                     <td>Nome</td>
                </tr>
            </div> 
            <div>
                <tr>
                    <td>gabriel</td>
                 </tr>
            </div>   
         </table>

    </body> 
</html>
  • Align is misspelled, and avoid tables for forms. Use the tag form

2 answers

0

You are writing "aling" instead of "align". Just change it and center.

<body>
     <table align="center" border="1">
        <div>            
            <tr>
                 <td>Nome</td>
            </tr>
        </div> 
        <div>
            <tr>
                <td>gabriel</td>
             </tr>
        </div>   
     </table>

</body>

  • 3

    questions that have a typographical error should be closed and not answered

  • knew no. I’ve even seen several questions whose typographical error were answered and still open here.

0

Look, you spelled Align wrong. A hint, tables give too much headache, only use them when you have no other choice :D

<table align="center" border="1">

Browser other questions tagged

You are not signed in. Login or sign up in order to post.