can somebody explain this

T

tony.johansson

The <h1> tag specifying a level one header but not really how this header
should be displayed(content tag)
The <b> tag on the other hand does not specify the content but only that it
should be displayed in a bold type face(presentation tag)

I don't understand this. By using a h1 tag you tell the size of the text and
by using a bold tag you tell that the text should
be bold.
So I can't see why you can say that a <h1> tag is a content tag and a <b>
tag is a presentation tag ?

//Tony
 
C

csharper

I am not sure the nomenclatures "content tag" and "presentation tag" are that important.

But, <h1> tag is not necessarily tied to a particular font size. The font size can be easily manipulated through css.

Also, <b> tag is considered obsolete and it is recommended we use css font-weight: bold to bolden the text.

<html>
<head><title>test</title>
<body>

<h1 style="font-size: small">header 1</h1>
<h1 style="font-size: medium">header 1</h1>
<h1 style="font-size: large">header 1</h1>

<b style="font-weight: normal">This isn't bold</b><br />
<b>this is bold, but obsolete.</b>
</body>
</html>
 
C

csharper

I am not sure if the nomenclatures of "content tag" and "presentation tag" are that important. But just in case you are not aware of this, an <h1> tagis not necessarily tied to a particular font size. The font size can be easily manipulated through css. Also, <b> is obsolete and it is easy make <b> tag-wrapped-up text unbold. It is recommended that we bolden our text using css.

Save the following sample in a text file as test.html and load into your browser, you will see what I mean.


<html>
<head><title>test</title>
<body>

<h1 style="font-size: small">header 1</h1>
<h1 style="font-size: medium">header 1</h1>
<h1 style="font-size: large">header 1</h1>

<b style="font-weight: normal">This isn't bold</b><br />
<b>this is bold, but obsolete.</b>
</body>
</html>
 
T

tony.johansson

"csharper" skrev i meddelandet

I am not sure if the nomenclatures of "content tag" and "presentation tag"
are that important. But just in case you are not aware of this, an <h1> tag
is not necessarily tied to a particular font size. The font size can be
easily manipulated through css. Also, <b> is obsolete and it is easy make
<b> tag-wrapped-up text unbold. It is recommended that we bolden our text
using css.

Save the following sample in a text file as test.html and load into your
browser, you will see what I mean.


<html>
<head><title>test</title>
<body>

<h1 style="font-size: small">header 1</h1>
<h1 style="font-size: medium">header 1</h1>
<h1 style="font-size: large">header 1</h1>

<b style="font-weight: normal">This isn't bold</b><br />
<b>this is bold, but obsolete.</b>
</body>
</html>

It's about this piece of text starting with The <h1> tag below. I mean when
I use the <h1> tag I mean the size and when I use the <b> tag I mean that
the text should be bold. So what has <h1> tag with content to do and what
has <b> tag with presentationm to do ?
The <h1> tag specifying a level one header but not really how this header
should be displayed(content tag)
The <b> tag on the other hand does not specify the content but only that it
should be displayed in a bold type face(presentation tag)
I don't understand this. By using a h1 tag you tell the size of the text and
by using a bold tag you tell that the text should
be bold.
So I can't see why you can say that a <h1> tag is a content tag and a <b>
tag is a presentation tag ?

//Tony
 
R

Registered User

The <h1> tag specifying a level one header but not really how this header
should be displayed(content tag)
The <b> tag on the other hand does not specify the content but only that it
should be displayed in a bold type face(presentation tag)

I don't understand this. By using a h1 tag you tell the size of the text and
by using a bold tag you tell that the text should
be bold.

Both tags assign a default style to their content.
So I can't see why you can say that a <h1> tag is a content tag and a <b>
tag is a presentation tag ?
When did I say that? ;)
Who did? A search of w3c.org shows the terms "content tag" and
"presentation tag" are used in the world of MathML but apparently not
in HTML.

<a
href="http://www.google.com/#sclient=psy&...gc.r_pw.&fp=d93d9db53c2df948&biw=1440&bih=744">
http://www.google.com/#sclient=psy&...gc.r_pw.&fp=d93d9db53c2df948&biw=1440&bih=744
</a>

or more succinctly

http://tinyurl.com/3c3p44x

If I have to guess I would hazard that an HTML presentation tag
describes an HTML control
<input id="txt" type="text" >
while an HTML content control simply contains content.
<b>some text</b>

I wouldn't be concerned with any alleged differences between
presentation and context tags until someone specified a reason to be
concerned. Then I would ask that individual to enumerate the
difference between two tag types.

regards
A.G.
 
A

Arne Vajhøj

The <h1> tag specifying a level one header but not really how this
header should be displayed(content tag)
The <b> tag on the other hand does not specify the content but only that
it should be displayed in a bold type face(presentation tag)

I don't understand this. By using a h1 tag you tell the size of the text
and by using a bold tag you tell that the text should
be bold.
So I can't see why you can say that a <h1> tag is a content tag and a
<b> tag is a presentation tag ?

<h1></h1> is propee content markup.

<b></b> should not be used.

<em></em> and <strong></strong> exists to do the same in a generic way.

Specific presentation directives should be done in CSS not in the HTML.

Arne
 
M

Markus Schaber

Hallo,

First, this is clearly the wrong group for a question like this, the
experts on HTML are in different groups.

tony.johansson said:
The <h1> tag specifying a level one header but not really how this header
should be displayed(content tag)
The <b> tag on the other hand does not specify the content but only that it
should be displayed in a bold type face(presentation tag)

AFAIR, the terms are structural and preentation, not content and
presentation.
I don't understand this. By using a h1 tag you tell the size of the text and
by using a bold tag you tell that the text should
be bold.

No, that's not correct.

The semantics of <h1> say that it is a headline of highest level.

It is correct that some graphical browsers render <h1> by increasing the
font size by default. (But this usuall breaks at least at the h3 or h4
level...)

But there are other options like using a different font, underlining,
changing the color. Some browsers (w3m, lynx, or braille displays or
audible browsers for visually impaired) even have no concept as "font
size", but they have their representation for Headlines (e. G. a
different voice to read them).

And even if your browsers default behaviour is just to increase the
font size, most graphical browsers allow to override this behaviour
either through user preferences, user supplied CSS, or CSS delivered by
the web site.

To increase the font size, use tags like <huge>, <font size="+42"> or
- even better - CSS.

The semantics of <b> say to use a boldface font, that's correct - at
least if the browser has the technical possibility to display it
boldface.

There is another difference between <b> and <h1>: The former one is for
a span of characters, the other one creates a new layout block
(linebreak etc.). But even this can be overridden using CSS.
So I can't see why you can say that a <h1> tag is a content tag and a <b>
tag is a presentation tag ?

Just read the HTML specifications for the defined semantics, instead of
selecting arbitrary aspects of your preferred browsers behaviour and
tread them as defined semantics.


Gruss,
Markus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top