|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
New to css: are u limited to tags in html
Hi there,
im just learning css now and im wondering if its possible to do this somehow: <myOwntagName style="font size: small; color: red; font-weight: bold; font-family: Arial, Helvetica, non-serif">This is a local stylesheet declaration. </myOwntagName> What i mean is that the above css inline code won't work or do anything because "myOwntagName" isnt recognized as an html tag. Is there a way to define your own tags? is this what xml is about (another thing i have to learn.)thanksNadvance, appreciated shokesy |
|
#2
|
|||
|
|||
|
Quote:
http://www.w3schools.com/xml/xml_display.asp |
|
#3
|
||||
|
||||
|
Quote:
Bingo..... ![]() But you are losing the whole purpose of CSS. Check out this code for example --> Code:
<style type="text/css">
<!--
.table {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
background-color: #FFFFFF;
border: 1px solid #000000;
padding: 10px;
}-->
</style>
<!-- The above defined our style -->
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="table">A simple table with a style applied</td>
</tr>
</table>
<!-- The above is the style applied to our table, eg: td class="table" -->
Copy and paste that code and run in your browser to see the output. No need to waste the power of xml when you can do it with a style sheet...
__________________
~ Joe Penn |
|
#4
|
|||
|
|||
|
thanks guys....
and that table example, WICKED! now i see the light ![]() |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > New to css: are u limited to tags in html |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|