Hello here's another basic tutorial/explanation! But without the long introduction! Let's get to it. (Reminder: everything you replace is capitalized)
In CSS (the part of your code that is under <style> or <style type="text/css">), ids and classes are placed. Basically, CSS is the design; the look and feel of the element. HTML is the content and layout. Ids are written with a "#" in the front of the name and a class is written with a "."
The codes go in braces like so: { code } commonly written as:
#id {
CODING
}
.class {
CODING
}
The coding is made up of many properties, which I will go into detail later, but common ones are:
height:20px;
width:20px;
border: 1px solid black;
padding:3px;
top:50px;
left:50px;
Anyways, now that you've got your CSS down, you can add your HTML. Using the same name as what you named your element, fill in this code:
<div id="id">CONTENT</div>
<div class="class">CONTENT</div>
If you used an id, use the top code and replace the word in the quotes with the name of your id.
If you used a class, use the bottom code and replace the word in the quotes with the name of your class.
THE DIFFERENCE BETWEEN THEM
IDs β Each element can only have one ID and that ID can only show up once on that page.
Classes β You can use the same class on multiple elements and more than one class on the same element.
There is nothing you can do with an ID that you can't do with a class.Β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
That's it for now! If you found this useful, please give it a like. Next (I have to write it down or I'll forget), I'll explain hover, then adding specialized links to a certain class or ID. Those explanations should be up soon!
ALSO, PLEASE PLEASE PLEASE SUGGEST THINGS YOU'D LIKE TO LEARN/SEE HERE. THANK YOU.