Yahoo Answers is shutting down on 4 May 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

can I include external html code into my index.html?

essentially (shorthand)

----------------------------------------------------

INDEX.HTML

----------------------------------------------------

<html>

<body>

<h1>Text example 1</h1>

<p>Here is a list that will change daily on many pages.</p>

<!-- This is the syntax I am searching for. I need to repeatedly change this section on multiple pages -->

<??>insert.html</??>

</body>

</html>

----------------------------------------------------

INSERT.HTML (or maybe even just TXT?)

----------------------------------------------------

<!-- Even though I used them here, I am guessing no body or html tags as I dont want to insert them into the code above?? Not sure, I just want this code to embed or patch into the index at the proposed spot somehow, so I can open only this file and make edits and instantly update the other pages all at once. -->

<html>

<body>

<ul>

<li><p>item 1</p></li>

<li><p>item 1</p></li>

<li><p>item 1</p></li>

</ul>

</body>

</html>

----------------------------------------------------

2 Answers

Relevance
  • God
    Lv 7
    5 years ago

    That depends on the webserver being used. Some (Apache, IIS) support server-side include directives, but they must be enabled.

  • Chris
    Lv 7
    5 years ago

    A much much better way is to use PHP.

Still have questions? Get answers by asking now.