How can I change the background of my web page depending on the time only using XHTML?

Wednesday, February 17th, 2010

I need to change the background of my web page 3 times a day. good morning, good afternoon, and good evening. this has to be in xhtml and not use javascript or PHP. I have to do this for a class which is why I cant use these.

<script language="JavaScript">

day=new Date() //..get the date

x=day.getHours() //..get the hour

if(x>=0 && x<4) {

document.write(’<style type="text/css">body{background: white url(1st.jpg); color: black}"></style>’)

} else

if(x>=4 && x<12) {

document.write(’<style type="text/css">body{background: white url(2nd.jpg); color: black}</style>’)

} else

if(x>=12 && x<18) {

document.write(’<style type="text/css">body{background: white url(3rd.jpg); color: black}</style>’)

} else

if (x>=18 && x<24) {

document.write(’<style type="text/css">body{background: white url(4th.jpg); color: black}</style>’)

}

</script>

Technorati Tags: , , , , , , , , , , , , ,

HTML?????????????????

Monday, February 15th, 2010

what is the function of:
<script>
<A>
HREF
Definition List
<comment>

Just as it appears here, nothing. <script> is the start tag calling for a script of a type that hasn’t been identified, for example <script type="text/javascript">, <a href is the beginning of the start tag for a link, and <comment> is a comment you can place in your code for various reasons/purposes but isn’t formed correctly. A comment would be <!– Comment goes here –>.

Here is an explanation of definition lists

http://www.benmeadowcroft.com/webdev/articles/definition-lists.shtml

Technorati Tags: , , ,

Whats the the difference between HTML and XHTML?

Sunday, February 14th, 2010


HTML is a markup language used for displaying text and documents across different platforms and machines. It was originally intended for a scientists to better display their data in tables, and has expanded to include hypertext, multimedia, as well as the style of the documents displayed. It allows an author to omit certain tags and use attribute minimization.
XHTML is an extensible markup language that was developed to retain the flexibility and power of HTML while reducing most of the complexity. It has tighter rules than HTML and allows for more ease in design from CSS (cascading style sheets) and other current languages. xhtml doesn’t permit the omission of any tags or the use of attribute minimization. However, it provides a shorthand notation for empty elements—for example, we could use <br/> instead of <br></br>—which HTML does not.

Here is a good site for tutorials and manuals:
http://search.oreilly.com/?q=xhtml

Technorati Tags: , , , , , , , , , , , , , ,

How to load a different HTML document in another directory?

Sunday, February 14th, 2010

Let’s say I have a normal folder with the ‘index’ file. Then in that folder I got a folder named example ‘Band’. And in Band I got a html document. How do I make a link back to the index in the previous folder?

Use "../" (without quotes) to send browsers up one directory. Use as many times with folder names to get the right relative path. Basically…

<p><a href="../index.html" title="Home Page">Home</a></p>

Ron

Technorati Tags: , , , , , , , ,

What is the html code when placing multiple links on a single image?

Sunday, February 14th, 2010

What is the html code when placing multiple links on a single image? For example… the image is a tree with three leaves. Rather than having the entire image being a link, how would I set up an html code that makes each individual leave a link?

To place multiple links on a single image you need an image map. You associate the image map with the image by giving the image map a name and referring to this name with you IMG tag’s USEMAP attribute. Within your map you will need one area element (tag) for each link.

Here is a simple example:

<img src="tree.jpg" alt="tree" usemap="leaves" width="100" height="150">
<map name="leaves">
<area coords="25,0,74,49" alt="Leaf 1" href="leaf-1.html" title="Leaf 1">
<area coords="0,50,49,99" alt="Leaf 2" href="leaf-2.html" title="Leaf 2">
<area coords="50,50,99,99" alt="Leaf 3" href="leaf-3.html" title="Leaf 3">
</map>

To aid the process of creating your map, there are lots of free image mapping sites. The one that I use is http://www.image-maps.com/

For more information, and an example, see http://www.html-tags-guide.com/html-map-tag.html

Technorati Tags: , , , , , , , , , , , , , , , , , ,

How do I get the HTML code from a logo to place on my blog?

Wednesday, February 10th, 2010

There is a site that would like me to put their logo on to my blog. How do I get the html code for the logo so it links to their page?

Making an image a link:

<p><a href="URL path to external link" title="Mouseover Description"><img style="width: XXpx; height: YYpx; border: 0;" src="Path to image" alt="Text Description"></a></p>

You can change the "p" tags to div tags and style as needed.

Right-click the logo and select View Image from Context Menu to get the URL of the image.

Ron

Technorati Tags: , , , , , , , , , , ,

How do I get an HTML code for a pic on Flickr to use as a layout on Multiply?

Thursday, January 28th, 2010

I’m pretty sure the html needs to go in "Custom CSS" but I cannot remember at all how to generate a code for one of my own pictures. I want to use one as a layout on Multiply or ask someone else if I can use theirs.

Thanks for the help in advance!

<img src="picturename.filetype">

Technorati Tags: , , , , ,

How can I make an HTML scroll box that contains an HTML code so visitors may copy that code?

Wednesday, January 27th, 2010

I am beating my head against a wall to try and figure this out and I’m probably completely overlooking it! I want to find an HTML scroll box that I can paste an HTML code in so users may copy it. When I input certain scroll box codes, the html code disappears or does some funky things to my site. Can someone help me?

You just need to put yout HTML code inside a textarea like this:

<textarea name="html_code" cols=40 rows=6>
Your html code here
</textarea>

Technorati Tags: , , , , , , , ,

what is the XHTML code to merge 2 horizontal cells in a table?

Tuesday, January 26th, 2010

I have 3 rows and 4 columns, the first row is all letters and the 2 bottom left horizontal cells need to be merged.

any help?

thanks

try this

<html>
<head></head>
<body>
<table border="1" width="100%">
<tr>
<td width="25%">1</td>
<td width="25%">1</td>
<td width="25%">1</td>
<td width="25%">1</td>
</tr>
<tr>
<td width="25%">1</td>
<td width="25%">1</td>
<td width="25%">1</td>
<td width="25%">1</td>
</tr>
<tr>
<td width="25%" colspan="2">1</td>
<td width="25%">1</td>
<td width="25%">1</td>
</tr>
</table>
</body>
</html>

Technorati Tags: , , , , ,

How to align text in a XHTML table column?

Tuesday, January 26th, 2010

I have been trying to align contents of cells in a table column but unable to so. Can someone give me the solution.

Hmm, well I’m not exactly sure how to do it in strict Xhtml, but if you want the easy way to do it, use:
<td valign="top">

Check http://www.w3schools.com. I’m sure they’ll have the info there.

Technorati Tags: , , ,