HTML & CSS Misc. Flashcards
What is an element?
An element is what HTML is composed of. Elements structure a web page and define its content. A tag and the content between two tags is called an HTML element.
What is the body tag?
The body tag is an HTML element, and the content inside this element is what displays on the screen.
What is a child element?
A child element is an element contained inside another element, which is the parent element.
How many types of headings are there in HTML?
6 total (h1 through h6)
What is the div element?
The div element is a container that divides the page into sections. This helps group elements in the HTML together. Also, div stands for division.
What is an attribute?
Attributes are content added to the opening tag of an element. They can be used in different ways like providing information or changing styling.
What are attributes made out of?
The name of the attribute and the value of the attribute.
Which tags do you use to display text in HTML?
Paragraph tag or span tag
When is it best to use a span element vs. div element?
Use span when you want to target a specific piece of content that is inline.
Use div when you want to divide your content into blocks.
Do the image (img) and break (br) tags require end tags?
No
What attribute is required in an image tag?
source (src) attribute
What should you always include in image tags to help with assistive technologies?
An alt attribute that provides a description of the image.
Does the video tag require an end tag?
Yes
How do you link to other web pages in HTML?
By using an anchor element <a> which requires an href attribute. The element requires an end tag and content between the tags.</a>
What attribute can you use to open a link in a new window?
target attribute
How do you add comments to HTML?
Less than sign, exclamation point, dash, dash, your comment, dash, dash, and then greater than sign.