# Running HTML questions and help



## [I.R.A]_FBi (Nov 1, 2008)

Im doing an assignment where i have to hand code some html. Small question how do i at a cool icon at the top like TPU's power button with simple html?


----------



## Disparia (Nov 1, 2008)

http://en.wikipedia.org/wiki/Favicon


----------



## Wozzer (Nov 1, 2008)

The Favicon, You mean?


----------



## [I.R.A]_FBi (Nov 1, 2008)

yes, thanks a bundle!


----------



## OzzmanFloyd120 (Nov 1, 2008)

All you have to do is throw an icon in the top directory and name it favicon.ico the browser will look for it automatically.


----------



## [I.R.A]_FBi (Nov 1, 2008)

thank you kind sir

...


suppose i have this
	
	



```
<br>Please select your model here
<br>
<br>
<br>

<select>
<option>Misubushi -- </option>
<option>Honda -- </option>
<option>Toyota -- </option>
</select>
```

and i want each option to be a hyperlink how do i do it?


----------



## Disparia (Nov 1, 2008)

```
<select onChange="window.location=this[this.selectedIndex].value">
	<option selected="selected">Select Yer Ride!</option>
	<option value="mitsu.htm">Mitsubushi</option>
	<option value="honda.htm">Honda</option>
	<option value="toyota.htm">Toyota</option>
</select>
```

If this is an assignment, shouldn't you be listening in class to know how to do it?


----------



## [I.R.A]_FBi (Nov 1, 2008)

the thing is, i was in the class and i was a little distracted (the first thign is asked wasnt taught) the second was, but the lecturer emailed the document (html) he was using but damn yahoo inlined teh attachement and now i cant dissect the code to see what to do. also what he did didnt look like what u did :|


----------



## [I.R.A]_FBi (Nov 2, 2008)

i have a site with frames (yes, i know dated but its whats in teh sylabbus) i have a top frame with the logo(not yet implemented)  side frame with the naviagion menu


```
<html><head></head>
<frameset cols="235,*" scrolling = "no" >
<frame src="navbar.html">
<frame src="main.html">
</frameset>
</html>
```

how do i let all the links from navbar load in teh frame with main instead of making a new page for everything i want in a frame?


----------



## Jacko28 (Nov 2, 2008)

Does it have to be only Html, or can you use CSS aswell?


----------



## [I.R.A]_FBi (Nov 2, 2008)

well mostly html ... i solved that problem but ive encountered another .. i want to confine that frame to a set size say like optimize it for a certain resolution how would i do that?


----------



## FordGT90Concept (Nov 2, 2008)

Use the iframe tag.  You can set a specific height and width using it.

Normal frames are always 100% on one dimension.


----------



## OzzmanFloyd120 (Nov 3, 2008)

[I.R.A]_FBi said:


> well mostly html ... i solved that problem but ive encountered another .. i want to confine that frame to a set size say like optimize it for a certain resolution how would i do that?



Like fordGT said, use an iframe tag, I forget how off-hand, but that's what I've always used for all of my websites. www.happyjousta.cjb.net is a site I had made back in high school and I have an iframe in that, take a look at my coding to see how it's done. keep in mind though that all of your links need to have the <a href=page.html target=iframe> for the link to work properly.


EDIT:
It's been so long that I forgot the tag for the iframe, but here's what I used back in the day
<iframe frameborder=0 name=main width=550 height=300 src=main.html>
the width and height can also be replaced with percentages rather than pixel dimensions.


----------



## [I.R.A]_FBi (Nov 10, 2008)

This code here


```
<html>
<title>Upt'wn Motorsports: Honda Packages
</title>

<link rel="SHORTCUT ICON" href="images\icons\Cabriolet.gif">

<body bgcolor = "#CCCCCC">
<center>
<table width="1000">
<tr>
<img src="images/banners/banner.jpg">
</tr>
<tr><table align="top" width="980">
<td width="250"> 
<table align="top">
<tr>
<a href="main.html" target="main"><img src="images\bars\bar_01.jpg"></a>
</tr>
<tr>
<a href="testimonials.html" target="main" ><img src="images\bars\bar_05.jpg"></a>
</tr>
<tr>
<a href="customercars.html" target="main" ><img src="images\bars\bar_07.jpg"></a>
</tr>
<tr>
<a href="services.html" target ="main"><img src="images\bars\bar_03.jpg"></a>
</tr>
<tr>
<a href="upgrades.html" target="main"><img src="images\bars\bar_02.jpg"></a>
</tr>
<tr>
<a href="otherservices.html" target="main"><img src="images\bars\bar_04.jpg"></a>
</tr>
<tr>
<a href="aboutus.html" target="main"><img src="images\bars\bar_08.jpg"></a>
</tr>
<tr>
<a href="contactus.html" target="main"><img src="images\bars\bar_12.jpg"></a><br><br><br><br><br><br><br><br><br><br><br><br><br>
</tr>
</table>
</td>
<td>
<p><center><font face = "MS Sans Serif"> <h1>Upt'wn Motorsports Honda Packages</h1> </font></center>
<br>
<br>
<br>
<font face = "MS Sans Serif">Our team of mechanics have done and assisted in many joint ventures in tuning many models of Hondas. 
Our Packages are as a result of many thousands of hours of reseach as well as careful consideration for bang for your buck. 
Please select a model to see the packages avaialble for such a model

<br>
<br>
<br>

<select onChange="window.location=this[this.selectedIndex].value">
	<option selected="honda.html">-- Select Your Ride! --</option>
	<option value="kseries.html">-- K Series Honda --</option>
	<option value="bseries.html">-- B Series Honda  --</option>
	<option value="hseries.html">-- H Series Honda --</option>
</select>
</font>
</p>


</tr>
</td>
</table>
<center><font face = "MS Sans Serif" size = "1">Site best viewed with <a href="http://www.mozilla.com/firefox?from=sfx&uid=0&t=318"><img border="0" alt="Spreadfirefox Affiliate Button" src="http://sfx-images.mozilla.org/affiliates/Buttons/firefox3/FF3o80x15_square.gif" /></a></center>
</center>
</body>
</html>
```


gives me this








It is caused by the breaks just after contact us, depending on the amount of breaks used, there will be a huge space above the left or right ... is there a way to finesse everything to be just below the banner instead of hit and missing with all of those breaks?


----------



## [I.R.A]_FBi (Nov 10, 2008)

anyone


----------



## FordGT90Concept (Nov 11, 2008)

a) You're missing the head tag around title and link.
b) Center is depreciated, use div instead:

```
<div align="center"></div>
```
Or, even more "proper"

```
<div style="text-align: center;"></div>
```
c) Tabbing is critical (aka nesting)--makes your code legible.
d) "tr" (Table Row) may not contain anything except "td" (Table Division).
e) All you are missing is an valign="top" in a TD somewhere...
f) "font" is also depreciated, use span instead:

```
<span style="font-family: MS Sans Serif;"></span>
```

The code below meets all criteria above.  I cannot test it very well because I don't have the pictures...

```
<html>
<head>
	<title>Upt'wn Motorsports: Honda Packages</title>
	<link rel="SHORTCUT ICON" href="images\icons\Cabriolet.gif">
</head>
<body bgcolor = "#CCCCCC">
	<div style="text-align: center;">
		<table align="top" width="1000">
			<tr>
				<td colspan="2"><img src="images/banners/banner.jpg"></td>
			</tr>
			<tr>
				<td valign="top" width="250"> 
					<table>
						<tr><td><a href="main.html" target="main"><img src="images\bars\bar_01.jpg"></a></td></tr>
						<tr><td><a href="testimonials.html" target="main" ><img src="images\bars\bar_05.jpg"></a></td></tr>
						<tr><td><a href="customercars.html" target="main" ><img src="images\bars\bar_07.jpg"></a></td></tr>
						<tr><td><a href="services.html" target ="main"><img src="images\bars\bar_03.jpg"></a></td></tr>
						<tr><td><a href="upgrades.html" target="main"><img src="images\bars\bar_02.jpg"></a></td></tr>
						<tr><td><a href="otherservices.html" target="main"><img src="images\bars\bar_04.jpg"></a></td></tr>
						<tr><td><a href="aboutus.html" target="main"><img src="images\bars\bar_08.jpg"></a></td></tr>
						<tr><td><a href="contactus.html" target="main"><img src="images\bars\bar_12.jpg"></a></td></tr>
					</table>
				</td>
				<td valign="top" style="text-align: center; font-family: MS Sans Serif;">
					<p>
						<h1>Upt'wn Motorsports Honda Packages</h1><br />
						<br />
						<br />
						Our team of mechanics have done and assisted in many joint ventures in tuning many models of Hondas.<br />
						Our Packages are as a result of many thousands of hours of reseach as well as careful consideration for bang for your buck.<br />
						Please select a model to see the packages avaialble for such a model<br />
						<br />
						<br />
						<select onChange="window.location=this[this.selectedIndex].value">
							<option selected="honda.html">-- Select Your Ride! --</option>
							<option value="kseries.html">-- K Series Honda --</option>
							<option value="bseries.html">-- B Series Honda  --</option>
							<option value="hseries.html">-- H Series Honda --</option>
						</select>
					</p>
				</td>
			</tr>
		</table>
	</div>
</body>
</html>
```


----------



## [I.R.A]_FBi (Nov 11, 2008)

god bless, wish i could give you more than one thanks.

Tabbing is a must.


----------



## JayD239 (Nov 11, 2008)

Brrr, tables to define a layout. Usually better to learn to position div's, this will blow away you're teachers mind. But I understand if you're not really up to that right now 

Just 2 more easy tips
Add a doctype on the very first line, to make it w3c-correct html

```
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
```

Validate your website, this propably is the first thing your teacher will check
http://validator.w3.org/


----------



## [I.R.A]_FBi (Nov 11, 2008)

i already presented it yesterday .. but im goign to email this copy to him then i redo it and let him see it.


----------



## OzzmanFloyd120 (Nov 11, 2008)

What was your grade on the project?


----------



## [I.R.A]_FBi (Nov 11, 2008)

I got a 78%


----------

