A. float 1

Salida

Ábrelo en otra pestaña.

Revísalo en gilpgedit.

1<!DOCTYPE html>
2<html lang="es">
3
4<head>
5
6 <meta charset="UTF-8">
7 <title>Float</title>
8 <meta name="viewport"
9 content="width=device-width">
10
11 <style>
12 nav {
13 float: inline-start;
14 border: solid;
15 }
16
17 aside {
18 float: inline-end;
19 border: solid;
20 }
21
22 footer {
23 clear: both;
24 }
25 </style>
26
27</head>
28
29<body>
30
31 <h1>Float</h1>
32
33 <nav>
34 <p>
35 Flota al inicio.
36 </p>
37 <p>
38 <a href="https://facebook.com"
39 target="_blank"
40 rel="noreferrer">
41 Facebook</a>
42 </p>
43 </nav>
44
45 <aside>
46 <p>
47 Flota al final.
48 </p>
49 </aside>
50
51 <p>Este ejemplo usa float.</p>
52 <p>
53 El párrafo que sigue te muestra
54 como flota el texto.
55 </p>
56
57 <footer>
58 <p>
59 El flotado se detiene con
60 clear: both.
61 </p>
62 <p>
63 © 2025
64 Gilberto Pacheco Gallegos
65 </p>
66 </footer>
67
68</body>
69
70</html>

Solo para los más rudos

skip_previous skip_next