plat: html code in datei auslagern

Beitrag lesen

Ich bin noch ein Anfänger und weiß nicht ob das in html möglich ist.
Ich habe ein Menü auf meiner Homepage welches in jeder html-datei steht. Also wenn ich im nachhinein etwas am Menü verändern will, muß ich jede einzelne Datei bearbeiten. Kann man html code aus dem Body herausnehmen, separat in einer Datei abspeichern und im body auf die Datei verlinken wo der auszuführende code steht?

Hier noch mein Beispiel:

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

<body bgcolor="#000000">
  <table border='0' width='750' align='center' cellspacing='0' cellpadding='0'>
     <tr>
      <td width='750' height='100'>
        <table width='750' cellspacing='0' cellpadding='0' align='center'>
         <tr>
          <td width='750' height='125' background='gfx/banner.jpg'>
          </td>
         </tr>

<tr>
   <table border="0" cellspacing='0' cellpadding='0'>
    <tr>
     <td>
<a href="index.htm" onmouseover="Bildwechsel(0,Highlight1)" onmouseout="Bildwechsel(0,Normal1)"><img src="gfx/start.jpg" border="0"></a></td><td>
<a href="login.htm" onmouseover="Bildwechsel(1,Highlight2)" onmouseout="Bildwechsel(1,Normal2)"><img src="gfx/login.jpg" border="0"></a></td><td>
<a href="anmelden.htm" onmouseover="Bildwechsel(2,Highlight3)" onmouseout="Bildwechsel(2,Normal3)"><img src="gfx/anmelden.jpg" border="0"></a></td><td>
<a target="_blank" href="http://www.silent-wars.de/sw-forum" onmouseover="Bildwechsel(3,Highlight4)" onmouseout="Bildwechsel(3,Normal4)"><img src="gfx/forum.jpg" border="0"></a></td><td>
<a href="faq.htm" onmouseover="Bildwechsel(4,Highlight5)" onmouseout="Bildwechsel(4,Normal5)"><img src="gfx/faq.jpg" border="0"></a></td><td>
<a href="support.htm" onmouseover="Bildwechsel(5,Highlight6)" onmouseout="Bildwechsel(5,Normal6)"><img src="gfx/support.jpg" border="0"></a></td><td>
<a href="impressum.htm" onmouseover="Bildwechsel(6,Highlight7)" onmouseout="Bildwechsel(6,Normal7)"><img src="gfx/impressum.jpg" border="0"></a></td><td>
<a href="agb.htm" onmouseover="Bildwechsel(7,Highlight8)" onmouseout="Bildwechsel(7,Normal8)"><img src="gfx/agb.jpg" border="0"></a>
     </td>
    </tr>
   </table>

<table border="0" cellspacing='0' cellpadding='0'>
    <tr>
     <td>
<a href="index.htm" onmouseover="Bildwechsel(8,Highlight9)" onmouseout="Bildwechsel(8,Normal9)"><img src="gfx/screenshot.jpg" border="0"></a></td><td>
<a href="login.htm" onmouseover="Bildwechsel(9,Highlight10)" onmouseout="Bildwechsel(9,Normal10)"><img src="gfx/links.jpg" border="0"></a></td><td>

</td>
    </tr>
   </table>

</tr>
    </table>
---------------------------------------------------------------------

und dann sollte es ungefähr so ausschauen:

---------------------------------------------------------------------
<body bgcolor="#000000">
  <table border='0' width='750' align='center' cellspacing='0' cellpadding='0'>
     <tr>
      <td width='750' height='100'>
        <table width='750' cellspacing='0' cellpadding='0' align='center'>
         <tr>
          <td width='750' height='125' background='gfx/banner.jpg'>
          </td>
         </tr>

<tr>

und hier halt irgendwie ein Verweis auf den seperat gespeicherten html code.

</tr>
    </table>
----------------------------------------------------------------------
Gruß
Plat