HTML Basics Flashcards
What’s an ID? how often can it be used?
ID = way to mark a code in HTML for CSS. Only one ID value per document.
What’s a class? How often can you use it?
Way to mark an element in HTML for CSS. Can be used multiple times.
ID vs class?
ID value = x1 use
Class value = x many many times. Good for grouping.
What is the lowest specificity weight? How much?
Tags are only one point
Which thing in HTML has the highest specificity weight? How much?
An inline style = 1000pts
Rank the following in specificity points: how many each?
ID, class, tags
ID = 100 points Class = 10 points Tags = 1
What examples of inline styles worth 1000 specificity points?
!important (bang important)
What’s a bang important? How and where to write it?
Bang important = most important code in your sheet for CSS.
Write in VSS declaration after value:
Color: red !important;
When’s the only time you should bang important?
Right before a deadline to string quick CSS together.
What’s an element? Give an example code.
Element = name of your structure. Ex. A, p, div
What are tags?
Carrots/ brackets + element
What are HTML attributes? Where do they go? Write example.
Gives more information to an element.
Go inside OPENING tag.
Ex. <a>click here</a>
What are all important structures in an HTML document. (From start to finish)
!DOCTYPE html Html Head Body /html
What part of an HTML document tells us what version of the HTML it is? Where does it go?
The document type declaration or doc type, “!DOCTYPE html” goes @ top first.
What are semantics
Meaning/purpose behind an HTML content
What 2 elements in HTML have NO semantic value (only for styling purposes)
DIVs and Spans
Block vs inline elements
Block start on their own line and stack on each other. For bigger content.
Inline start at next space in a content line. For smaller content.
Can Block elements wrap inline elements? What about the opposite?
Yes. And no.
How to write an HTML comment?
<!—content—>
Difference between strong & b element
Strong = strong semantic importance B= stylistically different text
You want to make “study” bolded and important in the following HTML. How do you write?
P< it’s really important to study every day >
P < its really important to < strong > study < / strong > every day < / P > < / strong >