That's understandable. The goal is not to memorize, per se. These things will get stuck in your head with practice. It's not easy, but you'll get there.
I'm not sure best is the word to use, but (1) it's what I use, so I will best be able to help you if you use it, (2) I will give all my examples and directions using Firefox, so you'll have an easier time, (3) it has a very good set of debugging tools, though others have good ones as well, (4) it's not commercial, and as a professor I don't like recommending commercial products, and (5) it's not spyware.
Great question. Elements (tags) fall into two categories: block
elements (boxes) and inline elements (text). DIV
is the
generic (non-semantic) block element. SPAN
is the generic
(non-semantic) inline element.
I'll draw a picture.
spans need to be inside block elements, and are typically inside paragraphs, but that's not the rule.
SPAN
is not a substitute for P
.
Fantastic question! Yes, we should use semantic tags if one is appropriate. We use the generic ones when there isn't an appropriate semantic one.
Suppose you need to mark parts of the text of an article as (1) key points, (2) new vocabulary, (3) doubtful statements, or .... There isn't an appropriate inline element for any of those. But we could use:
<span class="key">text</span>
<span class="vocab">text</span>
<span class="foreign">text</span>
etc.
figure
and figcaption
are better because
they are semantic.
We still use img
; there's no substitute for
that.
"meta" is information about the document. There are a bunch (author, keywords, etc).
There are other choices, but UTF-8 has many advantages and the world seems to be converging on that.
Attributes add additional information to a tag. Some attributes
apply to every tag, such as class
and style
. Some are specific to particular tags, such
as src
and alt
for img
.
Let's draw a picture
We'll see examples throughout the course.
I don't understand this question. What do you mean by "spacing"?
We can't add new tags to the HTML language. That's decided by the W3C: the World Wide Web Consortium.