Section 3 - Intermediate HTML Flashcards
How do you code an unordered list?
<ul>
<li></li>
<li></li>
</ul>
What is an unordered list? What does it create?
It creates bullet points (order doesn’t matter)
What’s an ordered list?
creates a numbered list of items in order
How do you code an ordered list?
<ol>
<li></li>
</ol>
What does an anchor element allow you to do?
create hyperlinks
What is an attribute in terms of anchor elements?
the attribute is the link that we add to the opening tag
What does it look like when we add a link to google to an anchor element?
<a href=”http://www.google.com”>This is a link</a>
Make sure attribute are added where?
in the opening tag
What is href used for?
to add the URL that the hyperlink should go to inside an opening anchor tag
What are global attributes?
Attributes that every single HTML element has access to (can be applied to every element)
href is a special attribute reserved for what element?
anchor tag
What’s the full code to start an ordered list from 5 instead of 1? Brainscape messed it up
<ol>
</ol>
Why is the URL for href in double quotations?
to distinguish it from reserved words like “href” “li” “a” etc, it’s just normal text
Where do you add a start element to an ordered list? Brainscape messed up the code
Inside the opening tag
<ol>
</ol>
Attributes go where?
In the opening tag
What kind of tag does the image element have? Brain messed up code
self-closing tags (no closing tags unlike anchor tags)
anchor:
<a>link it leads to text</></a>
image element:
<img></img>
How do you code an image element? Brain messed it up
<img></img>
What type of element is an image element?
a void element
What are void elements?
elements with self-closing tags
ex:
<hr></hr>
<br></br>
<img></img>
How do you size an image (image element)? What would that look like? (2)
you add /(whatever pixel number you want) to the end of the URL
<img></img>
What is an important attribute for image elements that you should always include?
Alt attributes
What does the Alt attribute stand for?
Alternative Text Description
What is the purpose of adding an alt attribute to an image element?
So screen readers can read out what the image is for the blind or visually impaired
How do you add alt attributes?
<img></img>