HTML Document Standards Flashcards
What do you put at the beginning of every HTML5 code
< !DOCTYPE html >
< html > tag
Adds HTML structure and context
What gets interpreted as HTML code?
Anything between < html > and < /html >
Metadata
Information about the page that is not displaced directly on the page
< head > tag
Tells the page what the heading is
< title > tag
always the child of the title tag, you put the title inside it
Where will the title appear?
On the thing that is at the top of websites
< a > tag
anchor element, adds links to a webpage
What does the anchor element need?
the href attribute
What does href stand for?
Hyperlink Reference
How would you link wikipedia?
< a href=”wikipedia-link”>wikipedia< /a >
Target element
Tells how a link should be opened
Where do you add the target attribute
In the opening anchor tag, just like the href attribute
_blank
Goes in the target attribute, will open the link in a new tab
Where are files stored?
The root directory (main folder)
What tells the browser to look for a file in the current folder
./
Example: ./index.html
Relative path vs. Absolute path
Relative path - path to a local file
Absolute path - path to file in a different folder
Wrapping
Putting an element inside another element, usually used for making hyperlink on things other than text
How to make an image hyperlink
wrap anchor element onto the image element
What is the purpose of putting an ID in an element
To allow you to add an anchor element which scrolls to it when clicked
EX: < a href=”#ID-NAME” >Bottom< /a >
What is white space?
White space is adding space in the html file to make it easier to read. The computer does not render white space
What is indentation
Making indents with the space or tab button to make code easier, the W3C recommends that you do 2 spaces of indentation for each child element.
What are comments
Text in the code that you can see but no one else can.
How do you make a comment?
Start with < ! – and end with – >