Frequently Asked Questions (FAQ)


about HTML

top

Q: What is "HTML"?

Answer:

  • HyperText Markup Language".
  • "HTML" is code that tells a browser what are the different parts of a web page, such as a paragraph, a header.
  • HTML is a "markup language". It is not a "programming language". It tells things about what the web page is. A "programming language" tells how to do things.

Q: What is "CSS"?

Answer:

  • Cascading Style Sheet
  • "CSS" is code that tells a browser how to display the web page — it tells what the web page will look like.
  • Learn more about css in the css-begin section.

Q: What is "code"?

Answer:

"code" is some text or characters that a program uses, but a person doesn't see. Your web browser is a program, that uses the html code to know how to display the text and pictures. When you look at your web page in the browser, you don't see the code.

Q: What is the minimum code an html page should have?

Answer:

At the very least, your page should have the codes you see in this template
(It doesn't need to have those comments though! But comments that are useful to you are good to have.)


about tags

top

Q: What is a "tag"?

Answer:

An html tag is a piece of code that tells the browser how to display something.

  • It begins with a left angle bracket: < and ends with a right angle bracket: >
  • For example, the <b> tag makes a word bold, and you would write the html like this: <b>bold</b>

All tags (well almost all), have a begin tag and an end tag, for example, <b> is the begin, and </b> is the end, in the <b>bold tag</b>

Q: What are these tags that don't have end tags?

Answer:

The most common ones are:
<br /> (line break)
<img /> (image)
Notice that because they don't have any end tag, they "end themselves" with / (slash).

This is confusing! Why don't those ones have end tags?

Think of a tag as a container, or a box. It holds some text or something. The begin tag and end tag are the top and bottom of the box.

For example, the <b> tag holds some text within it, which is bold. Everything outside the begin 'b' and end 'b' is not bold.

But the 'br' and 'img' tags don't hold anything: they are the thing.
For example: the <br /> tag doesn't hold a line break in it – it is the line break.

Q: What is an "attribute"?

Answer:

An "attribute" is something added to the tag, to change how it looks. It is like an adjective for a tag.

An attribute has a name and a value.

Example:

<img src="images/photo.jpg"
    alt="photo of me" />

src and alt are "attributes" of the img tag.

src is the name of one attribute, and images/photo.jpg is the value of that attribute.

Example:
<p width="50%">

width is an attribute of the p tag. The value is 50%.

Q: What are "block" and "inline" tags?

Answer:

"Block tags" are those which fall underneath each other down the page.

Most of the html tags are "block tags": h1 h2 etc, p, li, div.

"Inline tags" will flow "inline" — they will follow across the page.

A few tags are inline tags: The most common are: a, b, i, img, span.



learning HTML

top

Q: How can i learn html?

Look here.

Q: Why should i learn html? I can use Dreamweaver/Front Page/...

Answer:

  • Sometimes your web page tool (Dreamweaver, Front Page, ...) doesn't do things they way you want, and you will have to get in there and change the code.
  • If you want to be a serious web designer, or a programmer, you will eventually have to learn how to write some html yourself.
  • Also, it is always good (and interesting) to understand what is going on "under the hood".

The trouble with these programs is that they don't always make good html, and they don't help you to understand how it all works. When things get complicated, they substitute their own words and concepts for standard web technology concepts. So later you will have to learn all over again! Still, they can be useful when you are beginning, so that you can make websites right away. And you can make pages easily and then see how dreamweaver makes the html, to learn how html works.

Q: What is a text editor?

Answer:

A text editor is a program like Notepad – or better, Textpad, or some other good text editor. It edits only the text, the characters, of your file.

A program like DreamWeaver or Front Page is NOT a text editor. It is a website building program. If you write your web pages in the "code view", it can be very useful for making your web pages. But be sure to look at your pages in a real web browser — you may find that they don't look the same in the program "display view" as they do in a real web browser!

A program like Microsoft Word or Open Office Writer is NOT a text editor. It is a word processor: It has hidden codes in the file, and your web page won't work if you make it with Word or OOffice. In fact — if you open a Word (.doc) file with a text editor, you can see those codes!

Q: What is a "browser"?

Answer:

A "browser", or "web browser" is a program on your computer that displays web pages.

MicroSoft Internet Explorer is one web browser program. Another browser very popular these days is Firefox. Other browsers are Chrome. Opera. Safari. Galeon. lynx. and many others.

There are even web browsers that do not display the page the way you are used to seeing it: For blind people, there are browsers that speak the page, or make the page in braille. Mobile phones or PDAs have browsers that make a special small size of the page to fit on their small screen. 'lynx' is a browser which is text only - it does not display images, movies, etc.


fixing html

top

Q: My html isn't working right, but i can't see what's wrong. Is there some tool that will help me?

Answer:

Yes! This happens to all of us. No matter how experienced we are, we use tools to help us. The only difference is, when we are more advanced, we use more advanced tools.

There are many tools which can check your html code. This called "html validation" or "validating the html code".

The Firefox browser has an extension called "HTML Validator". It works right on your computer, and will check the html of your page, and show you any errors. It is very easy to install and use. Go to the Firefox website at www.mozilla.org/firefox for information and download.

You can also check your html online at the w3c website validator.w3.org/ You can upload your page, and it will check it and show any errors.

Go here for more about fixing your html pages.


writing good code

top

Q: What are things to remember when writing html code?

Answer:

  • Always use a blank line between code blocks.
  • Always close your tags.
  • Always use lower case tags - that is, <p>, not <P>
  • Always use quotes with an attribute:
    <p align="right">
    not
    <p align=right>.

You can go here to find more suggestions for good html, and why you want to write it.

Q: Sometimes i see web pages where many end tags are not used. Everything works ok, so why should i bother with end tags?

Answer:

Yes, on older websites this is often done, especially for the <p> and <li> tags. However this is not correct html and will cause you trouble when your html becomes very complex, and in the future when you start using stylesheets So it's better to get in the good habit now of ending your tags.

Q: I see lots of html code with upper-case tags, or even mixed, like 'bgColor'.

Answer:

Yes, those work fine. The browser doesn't care.
But – the professional standard for html is lower-case.
But, it will be easier for you, if your tags are all the same, and all lower case.
And - it will save you wear and tear on your little fingers, hitting that shift key!

Q: I see lots of html code where the quotes are not used. So why should i bother with quotes?

Answer:

In certain cases you have to have quotes. So it's easier to just always do them, instead of trying to remember when you need them and when you don't.



more html questions

top

Q: You're missing some tags in your tutorial! <font>, <center>, ...

Answer:
Those tags stopped being used years ago. We now change our font styles, centering, etc. using CSS language.

Q. But ... but ... we learned all these in html classes. Paid a lot of money for those classes too!
A. Yah i know. I'm very sorry to tell you that those classes are teaching way old html.

Q. I have made web pages with those tags and they all work ok.
A. Yes, the browsers are still recognising those tags because they know there are many old old web pages out there.
But in fact, we are now up to HTML5 and it is being used today. Soon the new browsers won't even recognise font, center, etc. So if you make web pages with those tags, some day they won't work at all!

Q: What is the "mailto" link, and why don't you teach it?

Answer:

Here is the "mailto" link:
<a href="mailto:EMAIL">some text</a>
This will make a mail program open up (usually Microsoft Outlook).

EMAIL is an email address.

The "some text" is the words that the user will see, that they can click on.

example:

Email: <a href="mailto:foo@bar.com">Foo Bar</a>.

Email: Foo Bar.

Why don't i teach this?

caution! Most people are using gmail or yahoo mail. So it is annoying if they have to wait for the mail program to open ... just so they can close it!

caution! Any email address on a web page will be found by spam programs, and that email address will get spam. So it is better not to put any email address on a web page, unless you know how to code the email address with programming so the spam programs can't read it.

Q: What is a "path"?

Answer:

A file (html page, image, etc.) is inside some folder. This folder is often inside another folder ... which may be inside another folder ...
Giving the names of the folders, starting at the top one, is the path to the file.

Often when we say path, we mean the name of the file itself as well.

So, something like: images/people/james.jpg is the path to the file james.jpg

Q: What is a "file"?

Answer:

A file is "one thing" on your computer.

One Word document is a file.
One photo is a file.
An html page is a file.

Q: What if i make mistakes?

Answer:

Excellent!

When you make mistakes, you will learn things!
Don't worry, you can't break anything. The computer will not explode, and nobody will die.

Every problem has in it the seeds of a solution.
If you don't have any problems, you don't get any seeds.
— Norman Vincent Peale

Q: Where can i learn more?

Answer:

There is more information here (the same place you got this file).
There is much more information on the world wide web. Here are some suggested good websites.
Search the web — Everything is there.
And of course you can always ask me!



copyright / license

top

Q: Can i copy this file? Can i give to other people?

Answer:

Sure, you can give it to anyone, according to the terms of the license below. It is copyright © 2004 James Walker.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included here.

If not found, find it at www.fsf.org - the Free Software Foundation.



translation

top

It would be very useful to have translations of this document in any language. Most preferred would be Tibetan and Chinese. Please contact me if you can do a translation for us.



contact

top

Was this helpful? Is it clear, or confusing? I would be happy to hear anything about how to make this better. You can contact me at the email address i have given you, or at http://www.webwalker.to/contact.php