Jump to content

HTML error

Billy_Mays

Ha did more than other people have and make an interesting page
<a href="file:///H:\Why\Why.htm>

<img src="hotdog2.jpeg">
<p> Don't know why I put that in there.
</p>
</body></html>

is there an error there because i can't find one (school project) hotdog2.jpeg is a picture it opened before i put the A HREF in and Don't know why is HTML'ed

Im a noob at HTML

Im mostly on discord now and you can find me on my profile

 

My Build: Xeon 2630L V, RX 560 2gb, 8gb ddr4 1866, EVGA 450BV 

My Laptop #1: i3-5020U, 8gb of DDR3, Intel HD 5500

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

close the a tag

The best way to measure the quality of a piece of code is "Oh F*** "s per line

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, espurritado said:

close the a tag

tried didn't work

Im mostly on discord now and you can find me on my profile

 

My Build: Xeon 2630L V, RX 560 2gb, 8gb ddr4 1866, EVGA 450BV 

My Laptop #1: i3-5020U, 8gb of DDR3, Intel HD 5500

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

I assume the image is in the same folder and the name and extension are correct

The best way to measure the quality of a piece of code is "Oh F*** "s per line

Link to comment
Share on other sites

Link to post
Share on other sites

Did something else I only need it to open another page made it open the C drive

Im mostly on discord now and you can find me on my profile

 

My Build: Xeon 2630L V, RX 560 2gb, 8gb ddr4 1866, EVGA 450BV 

My Laptop #1: i3-5020U, 8gb of DDR3, Intel HD 5500

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, espurritado said:

I assume the image is in the same folder and the name and extension are correct

yes i did read my last thing

Im mostly on discord now and you can find me on my profile

 

My Build: Xeon 2630L V, RX 560 2gb, 8gb ddr4 1866, EVGA 450BV 

My Laptop #1: i3-5020U, 8gb of DDR3, Intel HD 5500

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Maybe try adding a / so it reffers to the document root

 

<img src="/hotdog2.jpeg" alt="Hmmmm... Tasty!">

 

Quote or mention me if not feel ignored 

Link to comment
Share on other sites

Link to post
Share on other sites

oh crap I just saw it.

you are not closing the literal in the href

<a href="file:///H:\Why\Why.htm">

The best way to measure the quality of a piece of code is "Oh F*** "s per line

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, espurritado said:

oh crap I just saw it.

you are not closing the literal in the href

<a href="file:///H:\Why\Why.htm">

I did something else 

 

4 minutes ago, Cruorzy said:

Maybe try adding a / so it reffers to the document root

 


<img src="/hotdog2.jpeg" alt="Hmmmm... Tasty!">

 

Nice one

Im mostly on discord now and you can find me on my profile

 

My Build: Xeon 2630L V, RX 560 2gb, 8gb ddr4 1866, EVGA 450BV 

My Laptop #1: i3-5020U, 8gb of DDR3, Intel HD 5500

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Try to use a editor with Syntax highlights to make life easier.

 

Sublime, Atom

Quote or mention me if not feel ignored 

Link to comment
Share on other sites

Link to post
Share on other sites

22 minutes ago, Cruorzy said:

Try to use a editor with Syntax highlights to make life easier.

 

Sublime, Atom

I managed to open a server drive and the C drive so that's the two pages I needed 

Im mostly on discord now and you can find me on my profile

 

My Build: Xeon 2630L V, RX 560 2gb, 8gb ddr4 1866, EVGA 450BV 

My Laptop #1: i3-5020U, 8gb of DDR3, Intel HD 5500

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, Billy_Mays said:

<a href="file:///H:\Why\Why.htm>

This so so unbelievably wrong, you link relative to where the current file it so if you have a folder layout like this

index.html
/pictures
	image.png

You would link to the picture with 

<img src="/pictures/image.png">

 

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

44 minutes ago, vorticalbox said:

This so so unbelievably wrong, you link relative to where the current file it so if you have a folder layout like this


index.html
/pictures
	image.png

You would link to the picture with 


<img src="/pictures/image.png">

 

I started learning HTML last week but I got my project done 

Im mostly on discord now and you can find me on my profile

 

My Build: Xeon 2630L V, RX 560 2gb, 8gb ddr4 1866, EVGA 450BV 

My Laptop #1: i3-5020U, 8gb of DDR3, Intel HD 5500

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, Billy_Mays said:

I started learning HTML last week but I got my project done 

a great place to learn is w3shools. That's where I learn it and I still use it frequently for reference.  

                     ¸„»°'´¸„»°'´ Vorticalbox `'°«„¸`'°«„¸
`'°«„¸¸„»°'´¸„»°'´`'°«„¸Scientia Potentia est  ¸„»°'´`'°«„¸`'°«„¸¸„»°'´

Link to comment
Share on other sites

Link to post
Share on other sites

Good morning,

You have omitted the final ". 
 

Change this code:

<a href="file:///H:\Why\Why.htm>

Into this code:

<a href="file://H:\Why\Why.htm">



 

Regards,

Richard.

Link to comment
Share on other sites

Link to post
Share on other sites

<a href="file:///H:\Why\Why.htm>
<img src="hotdog2.jpeg">
<p> Don't know why I put that in there.
</p>
</body></html>
                       
<!--yours^^^-->
<!--mine vvv-->
                       
<html>
 <body>
  <a href="file:///H:\Why\Why.htm"></a>
  <img src="hotdog2.jpeg">
  <p>Don't know why I put that in there.</p>
 </body>
</html>
                       

The errors you made are kind of fundamental. If you just started learning it's fine, but I suggest you take a look at this, it may help you. ^_^

Link to comment
Share on other sites

Link to post
Share on other sites

On 5/15/2017 at 4:44 PM, Billy_Mays said:

Ha did more than other people have and make an interesting page
<a href="file:///H:\Why\Why.htm>

<img src="hotdog2.jpeg">
<p> Don't know why I put that in there.
</p>
</body></html>

is there an error there because i can't find one (school project) hotdog2.jpeg is a picture it opened before i put the A HREF in and Don't know why is HTML'ed

Im a noob at HTML

<html>
  <body>

    <a href="file://H:/Why/Why.htm">Link text</a>

<img src="hotdog2.jpeg" />
<p> Don't know why I put that in there.</p>
</body>
</html>

OR  

<html>
  <body>
<a href="file://H:/Why/Why.htm"> <img src="hotdog2.jpeg" /></a>
<p> Don't know why I put that in there.</p>
</body>
</html>

Each tag must end with an end tag, for example <p> CONTENT </p>

If a tag is a special one for which there's no concept of content, you shorten it by saying just />  ex : <img attribute="value" />

Or other examples: empty paragraph : <p />  , or horizontal ruler : <hr />

Paths should be relative to html document so that if you upload the html to a web server, you won't have to edit all html files to change paths.

Also note both Windows and browsers can use the "/" separator for folders, so it's safer to use that if you really want to link to a hardcoded (fixed) location

also note on Linux file and folder names are case sensitive so you generally want to make your life easy and use only lowercase characters.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×