PDA

View Full Version : Simple stuff?


Daybreak_0
10-23-2003, 07:51 AM
The more I research to more I am struggling to understand some of the reasoning behind not using certain tags.

For example, I read somewhere that the <br /> tag should not be used and margining/padding should always be set in CSS.


My problem is that every so often I come across circumstances where it is easy to use the above tag instead of creating something new in CSS or setting a style. I know that I will not need to use a new created CSS item ever again and the stlye takes more work to set up, so why go to all the trouble when a <br /> tag will fo what you want.

Maybe I am missing something here.

animgirl
10-23-2003, 11:04 AM
Where did you read that the "br />" tag should not be used??

There are no problems in using a "br />", but it's not a style, it's a tag. Now you could make it an id or class, but that's another story.

No one ever said CSS was the easiest way, but in the long run it yields the best results and saves time.

It really depends on how you are building your site.

animgirl

DCElliott
10-23-2003, 01:28 PM
It is nearly impossible to absorb the totality of what you need to know regarding HTML coding. Most of us use only a fraction of the tags available. One of the most difficult things to learn is to use the proper tags for a given situation. You don't use <br /> tags to create paragraphs - That usually means that the text is "bare" without being enclosed in tags. Every bit of visible content does something, and that something should be given appropriate context and presentation by the tag(s) in which it is wrapped.

This takes a long time to learn how and where to use tags. It is important to understand the "Semantics" of your content. (semantics being the study of language meaning) Tags are often used based on the meaning of the enclosed text. Hence we have headings, paragraphs, lists, definitions, addresses and the like. Your user agent (browser) translates the appearance of the content according to rules about how each tag should appear.
Here are a couple of links that may help with this concept: http://www.brainstormsandraves.com/articles/semantics/structure/
http://hotwired.lycos.com/webmonkey/02/42/index4a.html?tw=design

You may want tor review information on "deprecated tags" that you should not use. You can find info here: http://www.html-reference.com/depreciated.htm

DE

Daybreak_0
10-26-2003, 12:42 AM
Sorry for delay have been away for the weekend.

Thank you both, and for the links.

I read the wc3 is depreciating the Font tag as can be set within CSS, and it got me started on all, with <br /> being the first in my line of fire.

From the look of it I think I got my reasoning mixed up. Obviously the stuff I read about the <br /> tag was in regards to misuse of the tag, not about not using it.

I am not sure I understand why the Font tag is going....

I had set font attributes in CSS, but after some certain text I wanted to add more text inside brackets but at a smaller font to make it fit within some width restrictions. To me a simple change of the font size using the font tag made sense.

Will wait for more understanding to hit me, and as the font tag will be around for awhile yet, I still have time.

Thanks

DCElliott
10-26-2003, 04:28 PM
Originally posted by Daybreak_0 I am not sure I understand why the Font tag is going....

I had set font attributes in CSS, but after some certain text I wanted to add more text inside brackets but at a smaller font to make it fit within some width restrictions. To me a simple change of the font size using the font tag made sense.
That is a good question. The answer is this: if you have a website and you have a number of places where you want to use this smaller text, you have a couple of choices:

1) You can do each one with a font size change: <font size=whatever>My smaller text</font>.
2) You can create a class .smaller {font-size:80%;} and then use it:<span class="smaller">My smaller text</span>.

The difference is, you finish your website and, after thinking about it a bit, the 80% is still a bit big, so you want to change it to 75%. In example 1 you have to find and edit all those lousey, stinking, rotten, scummy font tags in each page and in example 2 you edit one line in one file and it is done.

Your choice ;)

DE

Daybreak_0
10-26-2003, 06:59 PM
a good example :)

In my case I only had one spot where I used the smaller font, but as it is not that much effort to create the CSS and the majority of the time you would edit more than one spot, I now understand why.

Thanks DC

Originally posted by DCElliott

you have to find and edit all those lousey, stinking, rotten, scummy font tags in each page

DE

lol - would hate to be a font tag, and meet you in a dark alley!! Maybe we need an anger management thread :)