简体   繁体   中英

horizontally Aligning three divs not working with only html

I have some code, and my stylesheet.css is not working so I figured out can't have css. I can only include html. I have 3 divs and I need to put them in a horizontal align. How do I do this?

Here is my code.

<div>Div 1</div>
<div>Div 2</div>
<div>Div 3</div>

And my css which isn't working.

div {
    height: 100px;
    width: 100px;
    background-color: red;
}

I need to horizontally align these 3 divs only with html.

This is a fairly easy problem to solve, and the table tag should help. The table tag does not use css.

 div { height: 100px; width: 100px; background-color: red; } 
 <table> <tbody> <tr> <td> <div>Div 1</div> </td> <td> <div>Div 2</div> </td> <td> <div>Div 3</div> </td> <tr> </tbody> </table> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM