Lecture 3: Anatomy of an HTML Tag Flashcards

1
Q

Opening Tag

A

An HTML Element placed within brackets with no forward slash

Example:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Closing Tag

A

An HTML Element placed between 2 brackets and sits right behind a forward slash

(Example: )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Pre-defined Attributes

A
  • Every Element can have these
  • Name-Value Pair: The metadata about the element itself that the attribute is applied to **(Example: <a> || “myid” = metadata of element </a><a> || “id” = attribute applied to element </a><a>)</a>
  • Each attribute has its own set of unique rules applied to the meaning of its value
  • *(Example: The value of an id attribute must be unique in the entire document, no other element’s id can be “myid”)</a>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Spacing Rules

A
  • NO Spaces between opening bracket (<) and tag name. (Example: “)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Attribute Rule

A

May only be specified within an opening tag AFTER the element.

(Example: )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Self-Closing Tag

A
  • Self-closing tags are illegal for ANY TAGS that are ABLE TO contain content. Having a self-closing content eligible tag makes HTML invalid.
  • A non-content eligible HTML element sitting IN FRONT of a forward slash and between 2 brackets

(Example: )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly