HTML Flashcards
How do you link a file in the same folder as the current HTML document?
Use an href attribute that refers to the html document.
Element tag
href attribute
./file (the ./ represents its in the same directory)
How do you link to a file in a folder one level up from the folder containing the current HTML document?
Use an attribute tag and use the href attribute that refers to ../ and your file name.
(<a>Your Text Here</a>)
What is an absolute file path?
The full URL name
Ex. “http://www.google.com
What is a relative file path?
A derivative of the absolute file path’s URL
Example: google.com/search?q=relative+links&rlz=1C5CHFA_enUS977US977&oq=relative+links&aqs=chrome..69i57j69i60.1831j0j15&sourceid=chrome&ie=UTF-8
What is a hyperlink?
An interactive text on the web that navigates the user from one link to another.
Do all HTML elements require a closing tag?
Most but not all. However it is in good practice to have or check for closing tags.
What are attributes for in HTML?
Attributes provide additional information about HTML elements.
- All HTML elements can have attributes.
- Attributes are always stated in the start of the tag.
- Attributes usually come in the name/value pair. (Ex. name=”value”)
What is the purpose of the alt attribute on the <img></img> element?
Alt attribute provides additional information for the <img></img> element in the case the image did not display.
How many heading elements are available for HTML?
6
What tags are necessary to complete an HTML skeleton?
- doctype declaration of html = this declares the document as html
- html tag = this is always at the beginning and end of the document
- head tag = provides info about the html
- title tag = gives a name for the html document that can be seen on the browser tab
- body tag = this provides visible and tangible information for the user
What type of content belongs within the head tag of an HTML document?
- Information about the HTML document
- Title tag that is used describe the document and for the user to see on the browser title or page tab
What type of information belongs within the body tag of the HTML document?
Visible and tangible content for the user. This includes: links, images, and text.
Where must the DOCTYPE declaration appear in a valid HTML document?
In the beginning of the document.
What is the difference between the href and src attribute?
href establishes a relationship between current application and external source
(relies on external resource)
src adds the resource to the page
(acquired internally)
Where do you put non-visible content about the HTML document?
Inside the head element
Info is called meta-data
Where do you put visible content about the HTML document?
Inside the body element
Where do the head and body tags go in a valid HTML document?
Head and body tags are children to the html element.
These two elements are siblings
What is the purpose of a !DOCTYPE declaration?
Declares that the document is HTML
Give five examples of HTML element types
Head, body, title, h1, p
What is the purpose of HTML attributes?
To describe/add/customize to a specific html element
Give an example of an HTML entity (escape character).
ambersan(&)word(xyz)semicolon(;)
- Do it to save time
- Isn’t mistaken for code
How do block-level elements affect the document flow?
These start a new line.
Only appear within the body element.
Take respective space of their parent element’s container.
How do inline elements affect the document flow?
These do not start on a new line.
Contain only data and other inline elements.
Cannot have block elements inside them.
What are the default width and height of a block-level element?
Takes the full width that is available (100%)
Takes as much height as content requires (auto)
- Text Input
- Password Input
- Text Area
- Radio Buttons
- Checkboxes
- Drop-down boxes (select)
- Submit Buttons
- Image Buttons
- File Upload