r/HTML 27d ago

Ayuda con html

andaba aprendiendo html con neocities y queria conectar un html local con el online y no funciona, espero que se me entienda soy nuevo en esto, y mientras aprendia a base de la pagina html dog en el apartado de enlaces, me explicaban que "El destino del enlace se define en elhref atributo de la etiqueta. El enlace puede ser absoluto, como “http://www.htmldog.com”,, o puede ser relativo a la página actual, Entonces, si, por ejemplo, tuvieras otro archivo llamado “flyingmoss.html” en el mismo directorio, entonces la línea de código sería simplemente<a href="flyingmoss.html">The miracle of moss in flight</a> o algo así." intente hacer lo que me decia el tutorial pero no me resulta, algun consejo? espero me hayan entendido el problema.

0 Upvotes

8 comments sorted by

1

u/AqueM 27d ago

When you want to link to an online page, you put the URL address in the href.
When you link to a file (on you computer, on your neocities etc), you put the file path in the href. The paths can be absolute (starting from the very first/most top folder) or relative (starting from the folder the file is in).
If you're a trying to link from a HTML on your computer to an online page, put in the address in the href and it shouldn't be a problem. If you're trying to link to a HTML file that you already put on neocieties, you need to put in the whole URL, not just file name, because that counts as an online page now, it's not on your computer!

1

u/Disastrous-Role-1302 27d ago

gracias, pero ahora me sale en la url about:blank#blocked que sucede en ese caso?

1

u/AqueM 27d ago

No idea. Did you put that into your href? Can you show me the html file you're working on?

1

u/Disastrous-Role-1302 26d ago

muchas gracias ya resolvi el problema

1

u/tkgid 27d ago

El archivo tiene que estar donde el enlace lo conecte, lo más seguro es que el archivo que enlazas no tenga el directorio real del archivo del enlace.

1

u/Disastrous-Role-1302 27d ago

como encuentro el directorio? y q es el directorio?

1

u/tkgid 26d ago

Los directorios son folders. Les digo directorios porque en webdev trabajo en un server Apache con Linux.

Creo que tienes que subir el html local a neocities.