I found where you can combine multiple classes together in the <body>, but can you
1. have muliple id's together? If so, how? I cannot seem to get it to work.
and
2. I cannot seem to comprehend the difference between class and id. I know it says you can only have 1 instance of an id, but multiple instances of class..
a. does this mean if I use say
#boldtext {
font-variant:small-caps;
font-weight:600;
}
than I can only use <span id="boldtext">only</span> one time in the html body?
-----or--------
2. it means something that I'm just not understanding...
I am using the above instance several times throughout the html page, but I get html tidy, telling me:
Warning: <span>anchor "boldtext" already defined
3. I don't know why it is telling me that it is and anchor, as it isn't, and
4. why would it tell me it is already defined? I have it defined in the <head><style> portion, but not in the html <body>.
??why would it say this is an anchor??
If you want to see what I am talking about, here is the html portion that I am talking about:
<p>H<span class="uppercase"><a name="hawaii" id="hawaii">awaii</a></span> - <span id="bolditalic" class="red">Illegal</span></p>
<blockquote>Hawaii State Law. Rev. Stats. Title 10, Chapter 134.<br />Firearms, Ammunition and Dangerous Weapons. Part 1. <br />General Regulations. Chapter 134-1 Definitions.
<br /><br /> "<span id="boldtext">Electric gun</span>" means any portable device that is electrically operated to project a missile or electromotive force.
<br /><br />Chapter 134-16 Restriction on possession, sale, gift or delivery of electric guns.
<br /><span id="bolditalic" class="green">(a)</span> It shall be unlawful for any person, including a licensed manufacturer, licensed importer or licensed dealer, to possess, offer for sale, hold for sale, sell, give, lend or deliver any electric gun.
<br /><span id="bolditalic" class="green">(b)</span> Any electric gun in violation of subsection (a) shall be confiscated and disposed of by the chief of police.
<div id="boldtext" class="navy">SUMMARY: Possession and sales of Stunning Devices are banned in Hawaii.</div><div id="toppage"><a href="#toppage">Top of page</a></div></blockquote>
and the warnings I am receiving:
Warning: <span> anchor "bolditalic" already defined
Warning: <span> anchor "boldtext" already defined
Warning: <div> anchor "toppage" already defined
I am also using the <div id="toppage"><a href="#toppage">Top of page</a></div> throughout the page.
5. Which leads me to another question/problem.
I have <style> assigned to #toppage { } But if I try to use the code as such in the <body> portion of the html, it won't apply my style.
<a id="toppage" href="#toppage">Top of page</a>
It will only apply the styling by:
<div id="toppage"><a href="#toppage">Top of page</a></div>
what am I doing wrong? Because html tidy doesn't like the second example of this... it gives me that warning above in the quote section.
Anyways, someone please help... I'm ready to pull my hair out, and that hurts!