PDA

View Full Version : HTML questions



Frank W
10-11-2004, 9:24 PM
I have'nt yet bought a basic book on HTML, and the Manual with IBM Home Page Builder does not answer some questions.

1. What is the function of the Attribute "COLSPAN", and is it essential to the construction of a data table?

2. Ditto for the <TBODY> & </TBODY> tags.

3. When inserting a link from a text string, where the text is in BOLD,- which is the better code -
.....(a)..... <B><A href="URL">textstring</A></B>
or (b)..... <A href="URL"><B>textstring</B></A>

My 'web design' is more a sequence of hopeful hacks and patches, and Home Page Builder does seem to add its own complications at times, especially if allowed to 'correct errors' automatically, so there is always some uncertainty when things don't turn out as expected. e.g. 'ragged' layouts.

Regards.......Frank W.

arthurk
11-11-2004, 6:09 PM
I have'nt yet bought a basic book on HTML, and the Manual with IBM Home Page Builder does not answer some questions.

1. What is the function of the Attribute "COLSPAN", and is it essential to the construction of a data table?COLSPAN is used if you want to combine cells in a table, and you need to specify how many cells to combine, e.g. <td colspan="2"> instead of just <td> at the start of the cell data. (ROWSPAN works in a similar way.)


2. Ditto for the <TBODY> & </TBODY> tags.Don't know much about this, but it's something to do with defining groups of data rows within a table. Apparently only a few browsers support this, so it may be best not to use it.


3. When inserting a link from a text string, where the text is in BOLD,- which is the better code -
.....(a)..... <B><A href="URL">textstring</A></B>
or (b)..... <A href="URL"><B>textstring</B></A>I think I'd opt for (b) because it's tidier for checking through the HTML, but I don't think it will make any difference.

I'm not an expert on HTML by any means - my wife, who uses it more, has found the book "How to create pages for the Web using HTML" by J. Shelley (2nd edn, Babani Computer Books) very helpful. It says it's for beginners and intermediate users, and not very expensive.

Arthur Kennedy

Neil Reynolds
11-11-2004, 8:02 PM
Frank,

For an excellent intorduction to HTML you won't find anywhere better (in my opinion) than http://www.w3schools.com/default.asp click on the Learn HTML link on the left hand side and you're away.

It's very easy to navigate and has sections both basic and advanced. I'd pick it over a book unless you really prefer the printed page (it's harder to read in bed!). It also has some little quizzes to see if you've learned the bits you've just read about. But if you just want to put some tables together, then go to the HTML Tables section and browse through the example.

Of course, you can then go on therough the rest of the site with xml, cascading style sheets, browser scripting...

Regards, Neil

Neil Reynolds
11-11-2004, 8:14 PM
While Arthur is quite correct in saying that both your code snippets in 3 will give the same visual and functional results I'd generally opt for a.

My reasoning is that the link is everything between the opening and closing A tags and includes the url in the opening tag and you are wanting to highlight the link in bold. In b you are highlighting in bold just the name of the target, not the whole link itself, indicating that the link is not an important bit. This is purely academic though because, as said before, the end result is visually and functionally the same.

Most people who knew me would ignore my reasoning above and say that I wrote this just because I like to disagree on such things. :D

Of course, that's simply not true. ;)

Regards, Neil

Peter Goodey
11-11-2004, 8:46 PM
Someone will correct me of I'm wrong but ISTR that 'STRONG' is recommended nowadays instead of 'B'. I think there are advantages for those visually impaired users who use their own style sheets to render web pages easier for them to read. It also leaves it to the browser to display STRONG text in its own way (which is as it should be - but in practice I can't imagine it making much difference)

Frank W
22-11-2004, 9:27 PM
Belated thank-yous to Peter Goodey, Neil Reynolds, and Arthur Kennedy for their responses to my HTML Questions posting.

A few more thoughts - The COLSPAN cropped up so frequently that it seemed it might be an essential in setting up a table, but it's more likely that it results from cloning chunks of a page to acquire some order and tidiness in layout. i.e. if it works - repeat it. (The original chunk having come from a table which had had columns or cells merged).

The <TBODY> </TBODY> seem to be automatically generated by the Home Page Builder program, and reappeared even after I had deleted all occurrences from the HTML code. Usually this happens when saving a page, and may be due to the HTML version used by HPB.

The distinction between STRONG and BOLD was something I had not discovered, and it seems to be that BOLD is classed as Physical Emphasis, giving an immediate and defined visible effect to text, while STRONG is classed as Logical Emphasis and allows for differences in display by different browsers, described as "Typically displayed using bold styling"

As regards HTML Manuals, I haven't yet had time to follow through on Internet tutorials, and will have to visit a good bookshop to find a printed manual that most appeals for readability etc.

Thanks again for the comments and advice.

Regards.......Frank W

Adi1962
24-11-2004, 9:06 PM
Frank,


If you PM me you address I have a book you can have. Its aimed at basic to intermediate and I have found it useful.

Adrian

Frank W
28-11-2004, 12:34 AM
Thanks Adrian

Will reply by e-mail as PM is subject to the same garble factor as ordinary Forum messaging.

Regards........Frank W