Ask coding questions

← Back to all posts
html question
h
paulinbacana

Hello guys, can someone tell me if i can create one .html file and call this file to my index.html??? (sorry for bad english 😅)

Voters
coolbub413
paulinbacana
Comments
hotnewtop
notGilbert

You need to use <a> (anchor) not the <link> tag.

<link> is basically metadata to include things like preloading and stylesheets

this would create a clickable link that will bring you to another page

paulinbacana

@notGilbert I'm not tring to do this, but thanks to try help me :)

notGilbert

@paulinbacana ohh.. do you mean like copying and pasting the file into index.html?

You can:

  • use a web framework like ejs or danjo (requires extra setup)

  • use some Javascript:

paulinbacana

@notGilbert Ok thanks

LAMAQDAHODWALA

Uh no... you can put all your html in one file. If you want to use html extending like you seem to be trying to do here, you can use a web framework, like flask or django, and use html extending from there.

paulinbacana

@LAMAQDAHODWALA I don't know how to do this, so i'm thinking to put the body tag in the index.html file