473,399 Members | 2,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Creating tags or using classes?

Is there any reason not to create tags with CSS? I normally see classes used instead.

For example:

[HTML]<style type="text/css">
smallcaps {
font-variant: small-caps;
}

.smallcaps {
font-variant: small-caps;
}
</style>

<smallcaps>Small capitals</smallcaps><br>
<span class="smallcaps">And small capitals</span>[/HTML]

Which is optimal?

thanks,
vito
Jun 10 '07 #1
4 1408
epots9
1,351 Expert 1GB
i think it has something to do with browser compatibility, some may not understand the new tags.
Jun 10 '07 #2
drhowarddrfine
7,435 Expert 4TB
CSS can only style an element, not create one.
Jun 10 '07 #3
CSS can only style an element, not create one.
Huh, yeah, well, it doesn't work in IE6... I'd only been using Firefox, which does correctly display new elements created in CSS. I couldn't find any info about this "glitch" online...
Jun 11 '07 #4
drhowarddrfine
7,435 Expert 4TB
It's not a glitch. The only way you can create a valid element is by using a custom DTD. While the css may style an invalid element, such as the one you created in your markup, the element itself was not created by CSS.

How a browser will react to this, especially if you were to use the DOM and javascript, I don't know. If it doesn't work in IE then you have a partial answer right there.
Jun 11 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Dan | last post by:
Lets say you open visual studio .net and do the following uint s = 100 s. // This now gives you all the methods avaiable to this object. And underneath the methods signature, there is a short...
8
by: Will Pittenger | last post by:
I have a Windows program C# .NET solution where when I update its XML documentation, some tags are not recognized and turned into the corresponding HTML. Those tags include <c>, <code>, <para>,...
4
by: Phil | last post by:
k, here is my issue.. I have BLOB data in SQL that needs to be grabbed and made into a TIF file and placed on the client (could be in temp internet dir). The reason we need it in TIF format is...
3
by: Rob Nicholson | last post by:
This is a question about the following KB article: http://support.microsoft.com/kb/q262161 We've got a problem with the Infragistics NetAdvantage presentation controls which they've suggested...
7
by: Rob Nicholson | last post by:
We're using a well known presentation layer library to implement complex controls on an intranet site. IE has the following limitation which effectively means that you can only have 30 <STYLE> tags...
5
by: viveklinux | last post by:
Hi , writing a small application in C which has to create an XML document by reading a binary format file. Trying to get the indentation right by using a depth global variable which will insert...
6
by: Sharon | last post by:
Hi all, I need to implement tags cloud. I get a collection of tags that have tag text and the number of times this tag is been used: , 52 , 43 , 52 And so on... How can i attach a font size...
17
by: Lee Harr | last post by:
I understand how to create a property like this: class RC(object): def _set_pwm(self, v): self._pwm01 = v % 256 def _get_pwm(self): return self._pwm01 pwm01 = property(_get_pwm, _set_pwm)
1
by: Abdo Haji-Ali | last post by:
Previously I used to create user controls if I wanted to use a specific set of controls in multiple pages, however I want to deploy my control in other applications so I thought of creating custom...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.