Formatting & CSS - formating a portion of a sentence (Full Version)

All Forums >> [Web Development] >> Microsoft FrontPage Help



Message


_gail -> Formatting & CSS - formating a portion of a sentence (11/29/2002 13:15:13)



I want to boldface the domain.com portion of this address, like so:

www.domain.com/squirrelmail/src/login.php

The entire page is formatted with a cascading stylesheet but I can' t figure out how to bold just a portion of a sentence. I' ve tried various class=" stuff" no avail.

So I inserted an html tag <b> </b> (I used tables so I could bold other areas with css).

[ See three quarters way down the page under " If you have SquirrelMail." http://www.gtbdesign.com/outlook.htm ]

Is it okay the way I' ve done this? If not, why? Is it otherwise possible to bold just a portion of a sentence?

thanks, gail




pageoneresults -> RE: Formatting & CSS - formating a portion of a sentence (11/29/2002 13:47:04)

Hello _gail, you can use the [url=" http://www.w3schools.com/tags/tag_span.asp" ]<span>[/url] element to do inline styling...

span.b{font-weight:bold;}

www <span class=" b" >domain.com</span>/squirrelmail/src/login.php

You can also use the <b> or <strong> element. The <strong> is the preferred way to bring emphasis to your markup. The <b> element is strictly visual. The <strong> element covers both visual and aural.

On a side note, you are using your <h> tags incorrectly. Also, do this...

Ctrl + /

That will reveal all tags on the page in normal view. See where you have <font> tags inside <h> tags? That' s another no-no when using css. This happens when you use the color tool in FP and not a style. This will also occur anytime you insert a symbol into your content. You should always do a Ctrl + / when you finish with a page. That way you can find any problems with your code quickly without going behind the scenes.




_gail -> RE: Formatting & CSS - formating a portion of a sentence (11/29/2002 14:21:44)


quote:

ORIGINAL: pageoneresults

you can use the [url=" http://www.w3schools.com/tags/tag_span.asp" ]<span>[/url] element to do inline styling...


Thanks for this; they never covered the span tags in class. [:' (]

quote:

Ctrl + /

COOL!

quote:

That will reveal all tags on the page in normal view. See where you have <font> tags inside <h> tags?

What' s the fix for this? All I want is a period following the number.

I think I fixed the H tags. Is it okay that I only have H3' s on the page (not h1 or h2)?

This css stuff is exhausting. [:o][;)][:D]

thanks, gail




pageoneresults -> RE: Formatting & CSS - formating a portion of a sentence (11/29/2002 14:35:59)

quote:

What' s the fix for this? All I want is a period following the number.

While in the Ctrl + / view, position your cursor in front of the opening <font> tag. Then use your delete button. That will remove the font tag.

It' s okay to use just <h3> tags but according to the W3C, it is not really proper formatting. You should start off with <h1> and work your way down to <h6>. But, only when applicable. There is no need to enclose everything in <h> tags, in fact, it may do more harm than good when it comes to the search engines.

I usually only have one <h1> at the beginning of my pages. That <h1> reads exactly the same as my page <title>. I' ve been doing this for years and have had great success with making those pages more relevant to search queries.

This css stuff is exhaucssting.

[url=" http://www.w3.org/2001/06tips/Use_h1_for_Title" ]Use <h1> for Title[/url]




_gail -> RE: Formatting & CSS - formating a portion of a sentence (12/3/2002 8:25:52)


quote:

ORIGINAL: pageoneresults

[url=" http://www.w3schools.com/tags/tag_span.asp" ]<span>[/url] element to do inline styling...


Excellent reference! Thanks for it.

quote:

You can also use the <b> or <strong> element.


Been thinking about this still.

I have no idea where I picked up this notion but I was under the assumption that when you used a Cascading Style Sheet you should not insert traditional html/xhtml code such as <b></b>. I thought you had to use this type of code <span class=" x" > as an inline style (ie. with class=" " ).

Can you give me some further insights about this?

thanks, gail





pageoneresults -> RE: Formatting & CSS - formating a portion of a sentence (12/3/2002 13:00:39)

Hi _gail, it' s all about usability and accessibility. The two tag references that you mention; <b> and <strong> can be achieved through css. But, you would not use the <span> class. You might do something like this in your css...

strong.blue{color:#000080;background:#fff;}

And then in your html you would put this...

<strong class=" blue" >Copy here...</strong>

<strong> is now favored over <b>. The <b> tag is for visual markup. The <strong> tag is both visual and aural. For those who have eyesight problems, the blind, etc., using strong helps them to read web pages more easily. An aural browser will emphasize what is between the <strong> tags. It also emphases what is between <em> tags which is the replacement for <i>.

You must use a strong class for the browser to interpret what you are doing. Just using a span with a font-weight:bold applied to it does not work.

There used to be a setting in FP that would allow you to use either <b> or <strong> tags. Anyone know where FP put this in 2002?




_gail -> RE: Formatting & CSS - formating a portion of a sentence (12/4/2002 10:11:12)


quote:

ORIGINAL: pageoneresults

Hi _gail, it' s all about usability and accessibility. The two tag references that you mention; <b> and <strong> can be achieved through css. But, you would not use the <span> class. You might do something like this in your css...

strong.blue{color:#000080;background:#fff;}

And then in your html you would put this...

<strong class=" blue" >Copy here...</strong>



p1r,

Here' s what I' m still unclear about.

Is there a preference as to which tag to use. The <strong></strong> OR the <strong class=" blue" >Copy here...</strong>

Seems to me, for formatting a word within text such as the bolding I wished to achieve, it is a lot simpler to use the plain html tag rather than inserting the <strong class=" blue" >.

Hope I' m making myself clear here.

I' m also curious about this. If I use a css sheet, is it prudent to do any formatting in the traditional manner, ie. by using FrontPage formatting menu commands.


quote:

There used to be a setting in FP that would allow you to use either <b> or <strong> tags. Anyone know where FP put this in 2002?


Yup, right-click text, select font. Or Format menu > font.

[image]http://www.frontpagewebmaster.com/upfiles/1556/Zx71957.gif[/image]




Reflect -> RE: Formatting & CSS - formating a portion of a sentence (12/4/2002 11:35:23)

quote:

Is there a preference as to which tag to use. The <strong></strong> OR the <strong class=" blue" >Copy here...</strong>


I would go with letting external CSS control this. If it needs changed down the road you edit it once instead of X times.
It will also reduce HTMl code bloat making the spider read your page easier.

quote:

I' m also curious about this. If I use a css sheet, is it prudent to do any formatting in the traditional manner, ie. by using FrontPage formatting menu commands.


Once I started into the CSS path I just stopped using FP for formatting period.

Sorry to jump in the middle of this,

Brian





_gail -> RE: Formatting & CSS - formating a portion of a sentence (12/5/2002 17:08:04)


quote:

ORIGINAL: Reflect

I would go with letting external CSS control this. If it needs changed down the road you edit it once instead of X times.


I may be incorrect but I don' t think this applies in this situation. I' m using inline formatting...the entire body text is controlled by the css but there are a few words WITHIN a paragraph that need bolding. The only way to do this, I believe, is with an inline style or html/xhtml code. I was just asking if it' s okay to use either.

quote:



Sorry to jump in the middle of this,



Certainly no need to apologize. The more the better!

gail




abbeyvet -> RE: Formatting & CSS - formating a portion of a sentence (12/5/2002 17:41:09)

I would feel that if you are just bolding it, not coloring it, the <strong></strong> works. If you are applying any additional style, then a class would be appropriate.


I would also be inclined, as a nod to browser compatibility, to add this to your stylesheet:

strong {font-weight:bold}
em {font-style:italic}

It is stating the blindingly obvious, but I think it safer.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.078125