HTML Flashcards
What does HTML stand for?
Hyper Text Markup Language
What are the four parts of HTML elements?
- Element Itself
- Opening Tag
- Content
- Closing Tag
What does the attribute ‘href’ mean?
Hyperlink Reference
How many heading elements are there in HTML?
Six. With 1 being the largest, and 6 being the smallest.
What is the ‘< div >’ tag used for?
The ‘< div >’ tag is used for grouping HTML elements together. It also allows for a neat, organized look.
What is an attribute?
Attributes are used to add information or modify the behavior of HTML elements.
What do attributes consist of?
A name and a value, expressed as: ‘ id=”example” ‘
Where are attributes located?
In the opening tag of an element.
What are two different ways you can display text in HTML?
With the ‘< span >’ and ‘< p >’ tags. (p for paragraph) The ‘< span >’ tag serves as a hook for CSS or JavaScript manipulation while the ‘< p >’ tag holds plain text.
What do you add to any tag that is the child of a different tag?
Two spaces of indentation for readability.
Typically, what does the ‘< em >’ and ‘< strong >’ tags do?
The ‘< em >’ (emphasize) tag adds italics. And the ‘< strong >’ tag makes the text bold.
How do you modify spacing in the browser?
Use the ‘ < br >’ (line break) tag.
How do you create an unordered list in HTML? (Bullet point list)
Use the ‘< ul >’ (unordered list) tag. Within the opening and closing unordered list tags you should have ‘< li >’ (list) tag to hold raw text.
How do you create an ordered list in HTML? (Numbered list)
Use the ‘< ol >’ (ordered) list tag. Within the opening and closing ordered list tags you should have ‘< li >’ (list) tags to hold raw text.
What is a self closing tag in HTML?
A tag that does not require a closing tag. They are formatted like so: ‘< img />’ (Self closing tags do not require the forward slash)
How do you add an image to your browser using HTML?
Use the ‘< img />’ tag. The image tag requires a src (source) attribute and the value is typically the images URL.
How do you add a description of an image to the ‘< img />’ tag? (Typically used for screen readers but can also be used in case the image doesn’t load and can also serve to increase your search engine optimization)
You add the alt attribute.
How do you add a video to your website using HTML?
Use the ‘< video (URL) (height=””)(width=””)(controls) >’ tag with the accompanying attributes. Be sure to include a closing tag.
What are some benefits of coherent structuring?
- Readability
- Accessibility
- Ease of Styling
How do you let a web browsers know that you are using HTML?
By starting with a Document Type Declaration. This is the declaration: ‘< !DOCTYPE html >’
How do you add HTML structure and content?
With the ‘< html >’ opening and closing tag.
How do you give the browser information about your website?
Use the ‘< head >’ tag you can add metadata to the website.
What displays on the webpages tab and is always in the ‘< head >’ tag?
The ‘< title >’ element and the content it holds.
How do you add a link to a webpage?
Using the ‘< a >’ (anchor) element with the ‘href’ attribute.
How do you specify how a link should open?
Use the ‘target’ attribute in the anchor (‘< a >’) tag.
How do you make a link open in a new tab?
Use the ‘target’ attribute in the anchor tag (‘< a >’) with the value of ‘_blank’.
Are attributes order specific?
No
How do you tell the browser to look for a specific file in the folder when using a hyperlink reference?
Using “ ./ “ tells the browser to look for the linked file in the current folder.
How do you add a hyperlink to an image?
Wrap the ‘< img >’ tag inside of the ‘< a >’ tag.
How can you send a user to a specific part of your webpage?
Use a hyperlink reference with the value of your corresponding ‘< div >’ id plus a # sign. So if your div id is “Introduction” then your link is formatted:
‘< a href=”#introduction”>Introduction< /a >
That will link you to the ‘< div id=”introduction >’ part of the page.
Who is responsible for maintaining the style and standards of HTML?
The World Wide Web Consortium or W3C
How do you write a comment in HTML?
With the <!-- opening and --> closing tags.
How do you specify whether a table heading is meant for a row or column?
Use the ‘scope’ attribute within the ‘< th >’ tag and set it’s value to ‘row’ for a row or ‘col’ for a column.
In a table, how do you make data span multiple columns?
Use the attribute ‘colspan’ with an integer value greater or equal to 1.
In a table, how do you make data span multiple rows?
Use the attribute ‘rowspan’ with an integer value greater or equal to 1.
How do you section off a table?
Use the ‘tbody’ element (table body).
How do you section off the heading of a table?
Use the ‘< thead >’ element.
What is the ‘< main >’ element separate from?
The ‘footer’ and ‘nav’ elements. This is because the ‘main’ element only holds the principle content of a webpage.
What does the ‘< section >’ element do?
It sections groups of code that have similar information and the same theme
What does the ‘< article >’ element do?
The article element marks the beginning and end of an article. It holds text, images, etc that should all be together in an article format. It helps people with screen readers understand where it begins and ends
What are some common uses for the ‘< aside >’ element?
Bibligraphies
Endnotes
Comments
Pull quotes
Editorial sidebars
Additional information
What is the element ‘< figure >’ used for?
To encapsulate images, illustrations, diagrams etc which is referenced in the main flow of the document