Advanced HTML Guide

HTML FAQ


  1. How do I make coloured Text?
  2. How do I get different types of Fonts on my page?
  3. How do I get rid of all the frames on a page?
  4. When people follow the links in the menu frame the link turns up in the menu area instead of the main body of the page. What am I doing wrong ?
  5. How do I put a MIDI music file on my page?
  6. How do you remove the colored border from pictures that are being used as links?
  7. How do I get rid of those free web space pop-up adverts?
  8. How do I ensure that my page is loaded into its frame?
  9. How do I stop my page from being loaded into somebody elses frame?
  10. How do I add a link to a page so the user can download my files / software / zip files etc?
  11. How do I add a link for people to send me email?
  12. How do I show HTML tags on my page?
  13. How do I stop people from seeing my HTML source?
  14. Where is your site hosted?
  15. How can I add a link to your website?


How do I make coloured Text?

Simply use the color and face attributes of the <font> tag, where color=#rrggbb (Red, Green, Blue) Hex value or colour name. (Red, Yellow, Green, Blue, etc)

<font color="#0000ff">This text is Blue</font>

This text is Blue

See the Hex colour table and my Colour Page for details of the codes for different colours.

Colour Name

Hex Value

Colour

Red #FF0000 .
Orange #FF8000 .
Yellow #FFFF00 .
Green #00FF00 .
Blue #0000FF .
Purple #8000FF .
Black #000000 .
Grey #C0C0C0 .
White #FFFFFF .


How do I get different types of Fonts on my page?

To get different fonts you need something like

<font size="+4" face="arial, scribble">The Dictionary</font>

which appears as The Dictionary

This sets the font size at 4 and tries to put in the Arial font if available or the Scribble font next, if neither of these exist then it uses the Browsers' default font. Just substitute these names for whatever font you want. You can specify as many of them as you like in the order of preference. Just separate them by a comma. To find out what fonts you've got look in your font drawer which should be in the Windows directory. Don't use anything to obscure as the person loading the page also needs to have the font installed for it to show up.


How do I get rid of all the frames on a page?

It's very easy you simply need to insert a target="_top" into the link eg:

<a href="http://www.advancedhtml.co.uk/" target="_top">My Home Page</a>

My Home Page

This will then get rid of any existing frames and load the page into the full browser window. Make sure the _top is in lower case letters. If _TOP is used then Netscape 4 and IE4 will open the page in a new window.


I have set up a page and I have used frames to provide a menu on one side and the main page on the other. The problem that I have is that when people follow the links in the menu the link turns up in the menu area instead of the main body of the page. What am I doing wrong ?

On your frame page you will need something like:
<frameset cols="150,*">
<frame src="menupage.htm">
<frame src="main.htm" name="main">
</frameset>

The important bit is the name="main" bit of the <frame src="main.htm" name="main">. This assigns a name to that frame so that you can direct your other pages to it. On the menu page all your links will need something like

<a href="main.htm" target="main">Main Page</a>

The target="main" bit sends the pages to the frame called "main" when you click on their link on the menu frame.


How Do I Put A MIDI Music File On My Page?
<embed src="midifile.mid" height=58 width=100>
Below are a few options that can be used with this command if you want.
  • autostart="true" - If 'true' is used then the MIDI File will play automatically when the page loads.
  • loop="true" - Will loop the MIDI file indefinitely.
  • controls="smallconsole" - Puts a small control panel on the screen instead of the normal larger one.

Browsers that do not support the <embed> tag will simply ignore it. You can put an alternative in a <noembed></noembed> tag. It is ignored by browsers that do support the <embed> tag.

<noembed><a href="midifile.mid">Click To
  Download MIDI File</noembed>


How do you remove the colored border from pictures that are being used as links?

You need to add a border="0" to the picture tag. eg.

<img src="picture.gif" border="0">


How do I get rid of those free web space pop-up adverts?

These windows are opened with the window.open function. JavaScript does however allow you to redeclare this function to return a false value instead of calling the original window.open function. Add the following code inbetween the <head> and </head> tags. Everytime the window.open function is called nothing will happen which means no more advert on that page.

<SCRIPT LANGUAGE="JavaScript">
<!--
function open(){
return false;
}
// -->
</SCRIPT>

Update: - I am lead to believe that due to changes that Geocities have made the above code no longer works on their site. I'm leaving it up though just in case it does.

Killing Tripod Pop-Ups - I have also been sent this code which closes the pop-up windows on Tripod web space.

<SCRIPT>
<!-- //
  function close_nagwin(){
  var popupURL = "blank.html";
  popup =
    window.open(popupURL,"TripodPopup",'toolbar=0,
       location=0,directories=0,status=0,menubar=0,
       scrollbars=0,resizable=0,width=0,height=0');
  popup.close()}
  close_nagwin();
// --!>
</SCRIPT>


How do I ensure that my page is loaded into its frame?

I have only solved half of this problem so far. The code below will ensure that your page is loaded into A frame. However I have not figured out yet how to ensure that the page is loaded into the correct frame. In the code below; if the page is not loaded in a frame then it will change the URL to frame.htm which is where the frame page is.

<SCRIPT LANGUAGE="JavaScript">
<!--
if (parent.frames.length == 0) {
  window.location.href="frame.htm"
}
// -->
</SCRIPT>


How do I stop my page from being loaded into somebody elses frame?

Add the following code inbetween the <HEAD> and </HEAD> part of your page.

<Script language="JavaScript">
<!--
if (self.location.href != top.location.href) {
top.location.href = self.location.href;
}
// -->
</SCRIPT>


How do I add a link to a page so the user can download my Files / Software / Zip Files etc?

Simply upload it to your site as you would with any HTML or picture file. Then include a normal link to it. eg. if your file is called software.zip and the file was 100Kb big, then you would include the following link:

<A HREF="software.zip">Click here to
  download my software (100Kb)</A>
Tips:
  1. Always compress any files that you upload using a utility such as the excellent WinZip. The files will be quicker for the user to download and all the files can be stored in a single compressed archive, so even if your program consists of hundreds of files the user only has to download one.
  2. Always include the size of the file in KB or Mb so that the person downloading the file knows how long it will take to download.
  3. Always have an explanation of what the file does so that the user can see what the file does before having to download it.



How do I add a link for people to send me email?

To add a email link you need to use the mailto: tag in an anchor tag. The most basic usage is just to include the email address.

Simple email link

<a href="mailto:[email protected]">Simple email link</a>
There are some other parameters you can add to automatically populate the subject and body of the email.

Email link test with subject and body

<a href="mailto:[email protected]?subject=Email test link&body=This is
 a test of the HTML support for adding email links.">Email link test with
 subject and body</a>

Here is the final example where the link creates an email with multiple recipients on the 'To:' line and also one recipient on each of the 'CC:' and 'BCC:' lines.

Multiple recipient test

<a href="mailto:[email protected],[email protected][email protected]
 &[email protected]&subject=Multiple email test link&body=This is a test of
 the HTML support for adding multiple email links.">Multiple recipient test</a>

Warning!

If you include an email address on a webpage it is almost certain that it will be harvested by spammers before long. Therefore if you decide to include an email address don't use you main email address. I'd recommend setting up a new email address specifically for this purpose and have a good spam filter on it.


How do I show HTML tags on my page?

If you want HTML tags to be displayed on your page such as <B>Bold</B> without the word being printed as Bold then you need to substitute the HTML symbols for special codes.

Replace This: With This:
< &lt;
> &gt;
" &quot;
& &amp;
Here are a few others that you may find useful.
Replace This: With This:
© &copy;
® &reg;
é &eacute;
There is a simple html converter tool on this site which can do this for you automatically.


How do I stop people from seeing my HTML source

In short, You can't. Just accept it. If the browser can display HTML, the user can read it.


Where is your site hosted?

This website is hosted by 1&1 Web-Hosting. I've been with them since 2000 and been very happy with them. This site is on their '1&1 Home' package which includes PHP, .htaccess, server logs and plenty of bandwidth and space. More information on choosing a website host and buying domain names can be found on my Buying Webspace guide.


How can I add a link to your website? *

If you find the Advanced HTML Guide useful you can add a link to it by copying and pasting the below code into your website.

It will look like this:

Advanced HTML Guide

* I have to admit that no one has ever asked this... but I can always dream!



If you have any HTML questions contact us and we might be able to add it to the FAQ.


  The  
Advanced  HTML
Site
Privacy Policy
Advanced HTML Home
Copyright © 1997 - 2016
Hosted by 1&1