Jump to content

I just finished the HTML tutorials.


Dr.T.O.Morrow
 Share

Recommended Posts

Well, I don't have a lot of questions. I was surprised at how easy it was. It reminded me a lot of an english class. :) Anyway, the first thing I wanted to know is this. Have I interpreted this correctly, in the HTML <head> & </head> tags, is that where you put all of the information that the browser doesn't display; or, does additional type of information go into those tags? :) Also, the one thing I didn't understand 100% was placement. I didn't understand in what chronological order these tags where to be displayed. Well, I know that the head tags come first. However, that is about it. I was never sure about the order that all these tags where to come in (i.e. do links come first; do paragraphs come last; do images come first or second; etc., etc., etc.). In HTML there is so much code that defines the website, and I assume that there is an order that it comes in. :)

Link to comment
Share on other sites

The things that go in the head are things like the page title, scripts that will run on the page (Javascript), CSS stylesheets, meta tags that describe the page, etc. The page content itself all goes inside the body. As far as order, just put things in the order you want them to show up on the page. There isn't a certain order that things need to be in, the browser will position things on the page in the order they show up in in the code unless there are CSS position settings that place the element somewhere else.

Link to comment
Share on other sites

  • 2 weeks later...

Well, I have another question. I don't know if this was ever addressed in the tutorials. When creating HTML code I noticed that sometimes spaces are used. Is there a reason that needs to be done? An example of what I am talking about is:<html><head><title>My Web Lab</title></head><body>Welcome To My Website.</body></html>

Link to comment
Share on other sites

"whitespace" is ignored in html.The spaces are simply to make the code more readable than the option of putting it all on one line.

<html><head><title>My Web Lab</title></head><body>Welcome To My Website.</body></html>

This should render the page the same as your code, but the code you posted is easier on my brain if I have to figure it out. :)

Link to comment
Share on other sites

Since HTML elements are nested one into another, you may even find it easier to read

<html>	<head>		<title>My Web Lab</title>	</head>	<body>		Welcome To My Website.	</body></html>

Again, because whitespace is "ignored" (actually, if you have more then one space, it's reduced to a single space, so there's still some spaces) this produces the same thing and it's far easier to read.

Link to comment
Share on other sites

But careful - in IE newlines are interpreted as spaces, so

<tag><tag>

is equivalent to

<tag> <tag>

not

<tag><tag>

In IE

Link to comment
Share on other sites

But careful - in IE newlines are interpreted as spaces, so
<tag><tag>

is equivalent to

<tag> <tag>

not

<tag><tag>

In IE

I thought that is the right behaviour, isn't it?
Oh, so the spaces are ignored in HTML, that is good to know. Well, what if the website is written in XHTML; will they still be ignored then?
In short - yes.
Link to comment
Share on other sites

Well, in FF, Opera and Safari, newlines are ignored, because or else say you had a list of images

<img /><img /><img /><img />

Then in IE you would have gaps between all the images. Don't know about "right" though...

Link to comment
Share on other sites

Well, I don't have a lot of questions. I was surprised at how easy it was. It reminded me a lot of an english class. :) Anyway, the first thing I wanted to know is this. Have I interpreted this correctly, in the HTML <head> & </head> tags, is that where you put all of the information that the browser doesn't display; or, does additional type of information go into those tags? :) Also, the one thing I didn't understand 100% was placement. I didn't understand in what chronological order these tags where to be displayed. Well, I know that the head tags come first. However, that is about it. I was never sure about the order that all these tags where to come in (i.e. do links come first; do paragraphs come last; do images come first or second; etc., etc., etc.). In HTML there is so much code that defines the website, and I assume that there is an order that it comes in. :)
Google HTML-kit and download it it has everything on there that u need
Link to comment
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
 Share

×
×
  • Create New...