Basic HTML and HTML5 Flashcards
Elements for headings:
< h1 > - < h6 >
Paragraph element:
<p></p>
How to leave comments in HTML:
< ! - - here - - >
How to add images in html:
< img src = “ “>
Paragraph element:
<p></p>
What is an alt attribute?
An alt attribute is used for screen readers to improve accessibility and is displayed if the image fails to load.
Alt attribute example:
< img src = “picture.jpg” alt = “guy doing stuff” >
How to link external pages with anchor elements:
< a href= “website.com” >this links to my website < /a >
How to link to internal sections of a page with Anchor elements:
Create an < a href= “id attribute” >jump to bottom< /a > and add that id attribute to an element on the bottom of the page.
Which anchor tag attribute opens a new tab?
< a target=”_blank” href =……. < /a >
How to nest an anchor element within a paragraph:
< p >
Hello here’s a link to < a target = “_blank” href = “brains cape.com” > brainscape.com < /a >
< /p >
(Only the brainscape is highlighted)
How do you make Dead links?
replacing a href attribute value with a #. (ex: a href: “ # “
How to turn an image into a link?
Nest the image within an A element.
How to create bulleted unordered list:
Use the < ul > element and follow it up with < li > elements for every entry in the list.
How to create an ordered list:
Use the < ol > element and follow it up with < li > elements for every entry in the list.