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