Skip to content

Changing the Button Text and Link

Stephen H edited this page Mar 18, 2019 · 2 revisions

Changing the Button Text and Link:

Open index.html and Find the following

<main> <a href="minecraft:">
  <div class="button"><span>Singleplayer</span></div>
  </a> <a href="minecraft:">
  <div class="button"><span>Multiplayer</span></div>
  </a> <a href="minecraft:">
  <div class="button"><span>Minecraft Realms</span></div>
  </a> <a href="https://steve-tech.github.io/HTML-Minecraft/docs/">
  <div class="button button_small left"><span>Options...</span></div>
  </a> <a href="javascript:window.open('','_self').close();">
  <div class="button button_small right"><span>Quit Game</span></div>
  </a> </main>

The text between the <span> & </span> is the text shown on the buttons; and the text between the <a href=" & "> is the link, you could put the name of another file or a whole URL in there it doesn't really matter also if your wondering minecraft: is a Windows Protocol to open Minecraft if it is installed.

Example:

<main> <a href="minecraft:">
  <div class="button"><span>This is the first button it opens minecraft</span></div>
  </a> <a href="https://www.google.com/">
  <div class="button"><span>This is the second button it opens Google</span></div>
  </a> <a href="https://github.com/Steve-Tech">
  <div class="button"><span>This is the third button it opens my GitHub</span></div>
  </a> <a href="https://steve-tech.github.io/HTML-Minecraft/docs/">
  <div class="button button_small left"><span>This opens the Docs</span></div>
  </a> <a href="javascript:window.open('','_self').close();"> <!-- This was me testing but it doesn't really work -->
  <div class="button button_small right"><span>This tries to close the tab</span></div>
  </a> </main>
Clone this wiki locally