<!DOCTYPE html> <html> <body> <h1>My First Heading</h1> <p>My first paragraph</p> <p>This is my first link:<a href="http://www.learndevnow.com">Learndevnow</a></p> <img src="../html5 Logo"> </body> </html>
Beginning HTML
Page 1 of 15 Replies - 438 Views - Last Post: 12 December 2012 - 09:42 AM
#1
Beginning HTML
Posted 11 December 2012 - 01:42 PM
Hi there. I was wondering if someone could tell me why the image in the following code appears in the browser as a little white box with a red x in the centre? Appreciate the help guys.
Replies To: Beginning HTML
#2
Re: Beginning HTML
Posted 11 December 2012 - 01:46 PM
#3
#4
Re: Beginning HTML
Posted 11 December 2012 - 02:37 PM
Where is the <head> section?? It is essential part of HTML-code! That piece of code would not pass validating. And I recommend to learn already from beginning to make valid code. That will help you so much in the future. It might feel indifferent to leave some parts from code, but everything even small tag is important!
#5
Re: Beginning HTML
Posted 11 December 2012 - 03:10 PM
Interestingly, the <head> element is not required to pass validation. The <title> element, however, is. According the the HTML specs, the <title> element should be inside a <head> element, but the W3C validator doesn't complain if it's just left in the <html> element.
So in theory, you are correct. There should be a <head> section with a <title> element in all HTML pages. But in practice you could just put a <title> element instead and leave out the <head>. (Not that I'd recommend it.)
By the way, if we are going to be going into validation mistakes. The <img> tag requires an "alt" attribute.
So in theory, you are correct. There should be a <head> section with a <title> element in all HTML pages. But in practice you could just put a <title> element instead and leave out the <head>. (Not that I'd recommend it.)
By the way, if we are going to be going into validation mistakes. The <img> tag requires an "alt" attribute.
#6
Re: Beginning HTML
Posted 12 December 2012 - 09:42 AM
Vompaudi, on 11 December 2012 - 02:37 PM, said:
Where is the <head> section?? It is essential part of HTML-code! That piece of code would not pass validating. And I recommend to learn already from beginning to make valid code. That will help you so much in the future. It might feel indifferent to leave some parts from code, but everything even small tag is important!
Thank you so much for your input.
Atli, on 11 December 2012 - 03:10 PM, said:
Interestingly, the <head> element is not required to pass validation. The <title> element, however, is. According the the HTML specs, the <title> element should be inside a <head> element, but the W3C validator doesn't complain if it's just left in the <html> element.
So in theory, you are correct. There should be a <head> section with a <title> element in all HTML pages. But in practice you could just put a <title> element instead and leave out the <head>. (Not that I'd recommend it.)
By the way, if we are going to be going into validation mistakes. The <img> tag requires an "alt" attribute.
So in theory, you are correct. There should be a <head> section with a <title> element in all HTML pages. But in practice you could just put a <title> element instead and leave out the <head>. (Not that I'd recommend it.)
By the way, if we are going to be going into validation mistakes. The <img> tag requires an "alt" attribute.
Excellent clarification....many, many thanks!
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote








|