|
Hi,
I want to know what is the best tag to use when making a piece of text a different color. I always used to use the <font> tag, but Visual Studio said that it is "outdated". So what should I use now? The <span> tag?
Please can someone advise?
Thanks
Brendan
|
|
|
|
|
Use CSS, the idea of which it to separate out your style from your content as much as possible.
|
|
|
|
|
Use CSS?? Of course I will, but you clearly didn't understand the question. I have a style called:
separator
{
color:#999;
}
So I wanted to know what tag must I use to apply this style to have a certain piece of text a different colour? The span tag?
|
|
|
|
|
--- NET Enthusiast wrote:</div>Use CSS?? Of course ---
Then what were you twittering on about using the <font> tag for?
--- NET Enthusiast wrote:</div>what tag must I use ---
well it depends on how you have styled you page. As you have it
separator
{
color:#999;
}
is defined neither as a class which can be applied to any element, whether it be p, td or yes, even span - in which case it should be
.separator
{
color:#999;
}
(and used eg <span class="separator"> )
or as a style applied to a particular element defined by its ID, eg <div id="separator"> in which case you shouold have
#separator
{
color:#999;
}
Generally you would use span for styling elements of [parts of text) that may require multiple uses, whereas applying an ID to an element applies oly to that one element.
|
|
|
|
|
The reason <font> is considered outdated is it tells you what (text is being formatted with a specific font, color...) but not why (text is being emphasized? de-emphasized? used to represent something specific, like a keyword, abbreviation, action...).
Generally, you should use a tag that most closely fits your intentions for the text: <p> ,
<em> , <strong> , <cite> , <code> , etc. If none of the standard semantic tags come close, use <span> for inline text, <div> for block text. When using span or div, or when you need to differentiate between multiple uses of another tag (different sorts of emphasis, code...), use CSS class names to specify your intentions: <em class="warning"> ; <div class="note"> . Then, in your stylesheet, write rules against these elements and classes to provide the actual formatting:
em.warning { color: yellow; }
div.note { border: 1px solid black; padding: 2em; background-color: yellow; }
---- You're right.
These facts that you've laid out totally contradict the wild ramblings that I pulled off the back of cornflakes packets .
|
|
|
|
|
sir ,
i am a third yesr engineering student and we are developing a web site,basically we are having difficulties in accessing data from our database,if u can give us an insight into thus
|
|
|
|
|
what exactly your problem ??
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
i am not getting the way to access database i.e if some action is done on front end hw to retieve or update the database accordingly.
|
|
|
|
|
|
sir my front end is JSP and HTML,the backend is db2 and the server side is done using JSP,the web application is developed using RAD
|
|
|
|
|
Well THAT narrows down the problem.
Blog link to be reinstated at a later date.
|
|
|
|
|
var n=''
str=document.getElementById("attach").value
m=str.lastIndexOf("\\")
for(i=m+1;i<str.length;i++)>
{
n = n + str[i];
}
alert
document.getElementById("name").innerHTML = n;
alert(document.getElementById("name").innerHTML);
this code is work in firefox while not work in ie given undefine. why?
anybody can tell me what the reason. Big Grin
I will do my best?
Integrated Solutions, Bikaner (Raj.), India
|
|
|
|
|
...
Blog link to be reinstated at a later date.
|
|
|
|
|
Hi,
I am started traying to create a project in html. I just want to know how to call a function.
ex:
here how to call bird .
|
|
|
|
|
If by function you mean a javascript function, then you call it like you would most other programming languages:
<img src="86ttap1.jpg" usemap="" name="imagebird" height="250" width="250" önclick="bird ();"></img>
|
|
|
|
|
Does anyone know what the proper way to separate email addresses in the mailto protocol is so they work with thunderbird and outlook?
Outlook wants semicolons and thunderbird wants commas. ARG!
Any ideas on how to make it work for both?
|
|
|
|
|
Ignore my comments, as I do not know what I am talking about, although I still hold that commas are bad for separating data.
Well, I don't know what the standards dictate, but logic should hold that addresses should be delimited using semi-colons, as a fully specified address could possibly contain embedded commas (but highly unlikely to contain embedded semi-colons)
For example, if a user had a fully specified address of "John C. Doe, MD <jdoe@example.com>" delimiting by commas would result in two addresses in the list "John C. Doe" (which may then match against an internal address book) and "MD <jdoe@example.com>". This is clearly not the user's desired effect.
Side-note:
Commas are a horrible delimiter in my opinion which is why I use the pipe character "|" in many circumstances as a delimiter rather than attempting to use a text qualifier for embedding commas in fields. Many programs do not like it when the text qualifier is not used for every instance of the field and even then you need to code for the embedded text qualifier. Using a character that is unlikely to be embedded is often the faster route.
modified on Saturday, October 4, 2008 2:05 PM
|
|
|
|
|
Scott Barbour wrote: logic should hold that addresses should be delimited using semi-colons as a fully specified address could possibly contain embedded commas (but highly unlikely to contain embedded semi-colons)
Logic should tell you that, sooner or later, someone will try to cram punctuation in somewhere. Either you have to disallow it completely, or escape it in some way.
Scott Barbour wrote: "John C. Doe, MD <jdoe@example.com>" delimiting by commas would result in two addresses in the list
No. I'm assuming you're using quotes to delimit the address in your reply, so the address under consideration is John C. Doe, MD <jdoe@example.com> . That contains an invalid character - the comma. Properly specified, the display name portion would be quoted to avoid this problem: "John C. Doe, MD" <jdoe@example.com> . Now, you could still have a comma-separated list of these addresses, since the quoted comma would not be recognized as an address separator.
Scott Barbour wrote: Commas are a horrible delimiter in my opinion which is why I use the pipe character "|" in many circumstances as a delimiter rather than attempting to use a text qualifier for embedding commas in fields.
If you can guarantee you'll never have a pipe character embedded in your fields, then this works. If you can't, then you must provide a way of escaping it and you're little better off than if you had used a comma.
---- You're right.
These facts that you've laid out totally contradict the wild ramblings that I pulled off the back of cornflakes packets .
|
|
|
|
|
Member 4483922 wrote: Any ideas on how to make it work for both?
To the best of my knowledge, you can't. The standard specifies a comma-separated list[^], but Outlook wants semicolons - so no matter which way you go, you'll end up breaking one or the other. Given that it is possible to configure Outlook[^] to recognize comma-separated lists, i would use commas... but YMMV - if most of your users end up using Outlook, then semicolons will keep them happier.
---- You're right.
These facts that you've laid out totally contradict the wild ramblings that I pulled off the back of cornflakes packets .
|
|
|
|
|
Hi,
Pls tell me any small example about Remote Scripting with out using Ajax in c#.net.Thanks in Advance.
|
|
|
|
|
Member 3824163 wrote: Pls tell me any small example about Remote Scripting with out using Ajax
What do you mean by "Remote Scripting". In this definition[^] it is defined as making a trip to the server. If we apply your question to that definition of Remote Scripting, your question becomes: How can a make a trip to the server without making a trip to the server.
So what is your definition of "Remote Scripting"?
led mike
|
|
|
|
|
I read one article which says, Remote Scripting can be implemented with or without using Ajax. I didn't mean that without making a trip to the server.I mean that without using Ajax only not server.
can anyone help me regarding this ??? Thanks in advance.
|
|
|
|
|
AnilJayanti wrote: I read one article which says, Remote Scripting can be implemented with or without using Ajax.
Can you provide a link to the article?
led mike
|
|
|
|
|
Thanxs. At Present i'm not having that link, and i also confirmed with my friends who works on Remote scripting that page events code will be handled in javascript and Remote scripting DLL.
|
|
|
|
|