Thursday, March 29, 2007

Project 2 - Simple HTML

Before I start describing HTML I want you to just try it first.
When entering a comment you will see a line above the comment box saying that some simple HTML like < b> and < i> are allowed. I want you to type (do not copy) the next line exactly as shown:

My name is <b>Moochie</b> and I like to <i>learn new things</i>.

Publish it and see what happens.

7 comments:

Anonymous said...

It wouldn't allow it.

tgf said...

I am not sure what you mean "would not allow it". Perhaps you mistyped the message? Now try to copy that line - highlight it (select that line), Copy, click inside the comment box and Paste.

We never discussed if you know how the Copy/Paste work, I assume that everyone knows. But perhaps not you, but someone else, lurking but never admitting he is watching, needs that lesson - for him here is a link to the Copy/Paste lesson I wrote.

BTW - use either your Blogger or Other identity, in fact the system suppose to recognize you and always suggest your Blogger ID - use it, you (but others do) do not need to use Other anymore.

Anonymous said...

I typed the HTML here in this spot.
I got the response that I scaned and sent to you. Your HTML cannot be accepted: Tag is not allowed.

Anonymous said...

My name is Moochie and I like to learn new things.

You probably mistyped it - here I just copied the text and it works!
Please copy/paste it yourself to prove that it works.

Anonymous said...

My name is Moochie and I like to learn new things.

Anonymous said...

Maybe I didn't type it right. It just worked. Thanks.

tgf said...

Of course it worked! :)
The question is what happened, why did it work?
What happened was that the name "Moochie" is shown bold (thicker) and the words "learn new things" are italic (at an angle).
In HTML (and all web pages are written in the HyperText Markup Language - HTML) the pages are constructed by the browser (most times it is Internet Explorer) from the instructions received from the site. Most of the instructions consists of a pair tags, one is opening tag and another closing. In the case of bold anything placed between the <b> and </b> tags looks thicker.

You will probably never ever write the code directly as we did right now (that's a relief, no?), but you will use some editor's bold button to make the text thicker. I just want you to know that internally that translates to the tags. In fact I want you to do this test - at the top of the page (and at the top of any page) there is a menu that has buttons starting with File, Edit and View.
Click on View and there click on Source. A window will open and its very first line will contain a word "HTML", indicating the language used to create the page.
Now you will learn another magic key - push Ctrl-F, that is a universal call for Find, it would work in any program (Microsoft Word, Email, etc.) In the Find box enter <b> and click the button (probably Next). This way you can find the bold text you typed.

I know this was a hard to absorb lesson, but this is the type of information that helps to understand how it all works.