HTML & CSS- part 5 Flashcards
How do you center an image?
Use these in a class, ID, or CSS statement:
display: block;
margin-left: auto;
margin-right: auto;
What can you use instead of:
margin-left: auto;
margin-right: auto;
margin: 0 auto 0 auto;
What does float mean when working with an image?
Wrapped text. So if you float the image to the right, then the text will be on the left and vice versa:
float: right;
How do you stop wrapping text?
Cancel out the float with
p {clear: both;}
How is a link displayed by default?
in blue with an underline
What does href stand for?
Hypertext Reference
What is href telling the browser?
“Watch for an address immediately following the equal sign.
Go there page to load when the user clicks the anchor.”
How would you type a link to stackoverflow.com from another site?
<a>Stack Overflow</a>
In this link, what is the anchor?
<a>Stack Overflow</a>
The anchor is “Stack Overflow”
The anchor is the link text between the opening <a> tag and the closing </a> tag.
It is the text that the user sees.
If you’re linking to a page on the same website and in the same folder, do you have to use the full address?
No. You can just use the page name.
How do you link to a page on the same website but in a different folder?
Add the subdirectory name:
“catalog/products.html”
In this case, the subdirectory is “catalog”
What is domain name and example?
The unique name that appears after the @ sign in email addresses, and after www. in web addresses.
peta.org
What does this mean?
../
It’s used in the HREF to go up one directory level
If you’re linking to the same site you are on, do you need a / in from of the subdirectory?
No
Code an opening tag that links to the subdirectory PETS that’s on the same level as the subdirectory you’re linking from. The page is CATS.HTML
<a href=”../pets/cats.html”>