Help with HTML codes...?

  • Thread starter Thread starter Info Master
  • Start date Start date
I

Info Master

Guest
I need to know how to make these HTML codes

To have the current date/time on the web page

To have an RSS feed from BBC news

and also how to make it so that when you leave the site it gives a message saying "Bye!" (or something similar) with a button to say close or exit, which will then close the page.

and one last thing, a HTML code for a daily changing quote from a database of quotes, for example one day it might give a fact about the earth, the next a fact about maths.

Thanks!
 
> To have the current date/time on the web page

You can't achieve this with HTML. You need a programming language to generate the HTML dynamically.

There are two "current" times. The time on the server and the time on the visitor's computer.

It is useless to tell the visitor their local time - they'll almost certainly have a clock in the lower right of their screen anyway.

To get the server time you will need to generate the page using a server side technology such as FastCGI, CGI or a language specific tool such as mod_perl or mod_php.

> To have an RSS feed from BBC news

Again, this needs a program to generate the HTML.

> and also how to make it so that when you leave the site it gives a
> message saying "Bye!" (or something similar) with a button to say
> close or exit, which will then close the page.

This isn't possible. The closest you could get would be something which, when leaving the current _page_ would give the user a chance to cancel. This would need JavaScript, and is very irritating (unless the user is in the middle of filling in a form and leaving accidental)

> and one last thing, a HTML code for a daily changing quote from a
> database of quotes, for example one day it might give a fact about the
> earth, the next a fact about maths.

Again, this needs to be generated from a program. Plain HTML can't do it. You also need the database of quotes to draw from.
 
HTML does not have tags for the purposes you want. HTML is a markup language, hence the name (HyperText Markup Language).

What you want are scripts, either javascripts, or some third-party utilities. The date and time might be available through server-side includes, but you'll have to check your web server documentation.
 
Back
Top