IS 201 HTML Final Exam with Complete
Solutions
-A href - ANSWER-Links tell the browser where to go using an href attribute, which
stores a URL.
-Headers (h1, h2, ect) and how they work - ANSWER-Headers structure content and
assign values to different bodies of texts with <h1> being the largest and most important
and <h6> being the smallest and least important
-How to apply a style sheet - ANSWER-•You can always make changes directly in your
html file by using the <style> tag, but a css file is better.
•Style sheet is linked in the head, so before it closes. It looks like this:
<link rel="stylesheet" href="mystyles.css"
•Then in the style sheet, for example, you could put:
p{
color: green;
Font-size: 14px;
}
...and then part of your html file that says <p> will apply that style from css.
-Inline vs block elements (images are inline, block elements are paragraphs, headers,
breaks) - ANSWER-Block elements: Start on a new line and occupy the full width
available, stretching out to the full width of the parent element.
Can contain other block elements or inline elements.
Common block elements include <div>, <p> (paragraphs), <h1>-<h6> (headers),
<ul>/<ol> (lists), and <li> (list items).
Inline elements: Do not start on a new line. They appear on the same line as the
preceding content, as long as there's space.
Only take up as much width as necessary, not the full width of the parent element.
Cannot contain block elements, only other inline elements or text. Common inline
elements include <span>, <a> (links), <img> (images),
-Know how to apply an on page anchor - ANSWER-An on page anchor is anything like
"home" or "Go to top of page" you can apply them by using:
<a>Go to top of Page </a>
If you want it to become a link then you need to use:
<a href=""
Don't forget to give an ID to the place you are trying to link to for on page links. For
example:
<li id="edu">Education
Then up on the href put:
<a href="#edu">Education</a><br>
, -Understand br's (breaks) - ANSWER-<br> is a self closing tag. It creates a break of
space in your code. You can put:
Lydia Pruitt <br>
Spanish Major
...and you wouldn't need to close it
-Understand comments in html - ANSWER-<!--This is a Comment-->
-Understand how to apply a style to a div ex. <div class="common na"> - ANSWER-A
<div> helps us assign attributes from a style sheet to our page. For example:
<div class="leftmenu">Left Menu</div>
On my stylesheet I have a portion called .leftmenu, and this code tells it to assign "Left
Menu" to this style type.
-Understand how to BOLD something - ANSWER-(font-weight: bold;) or, <b>
-Understand how to center text - ANSWER-You can center text in CSS using text-align:
center;
-Understand how to change the font color - ANSWER-In a stylesheet you can make
something called:
.newfont{
color: green;
{
-Understand how to navigate your directory using html (<a href ="html/resume.html"> -
ANSWER-If a file is in the same directory just use the file name
ex. <a href="resume.html">Resume</a>
If a file is in a sub directory then include the directory and the file name. ex. <a
href="html/resume.html">Resume</a>
To reference a file in a parent directory, use ../ to move up a level in the directory.
Example: If your current file is in the html directory and you want to link to a file in the
parent directory, use <a href="../resume.html">Resume</a>
To reference from the root directory (the base directory of your website), start the path
with /.
ex. <a href="/html/resume.html">Resume</a>
-Understand ordered and unordered lists - ANSWER-Unordered lists (<ul>) are used
when the order of the item is not important, using bullet points.
Ordered lists (<ol>) are used when the order of the item IS important, numbering them.
Here is an example:
<ul>
Solutions
-A href - ANSWER-Links tell the browser where to go using an href attribute, which
stores a URL.
-Headers (h1, h2, ect) and how they work - ANSWER-Headers structure content and
assign values to different bodies of texts with <h1> being the largest and most important
and <h6> being the smallest and least important
-How to apply a style sheet - ANSWER-•You can always make changes directly in your
html file by using the <style> tag, but a css file is better.
•Style sheet is linked in the head, so before it closes. It looks like this:
<link rel="stylesheet" href="mystyles.css"
•Then in the style sheet, for example, you could put:
p{
color: green;
Font-size: 14px;
}
...and then part of your html file that says <p> will apply that style from css.
-Inline vs block elements (images are inline, block elements are paragraphs, headers,
breaks) - ANSWER-Block elements: Start on a new line and occupy the full width
available, stretching out to the full width of the parent element.
Can contain other block elements or inline elements.
Common block elements include <div>, <p> (paragraphs), <h1>-<h6> (headers),
<ul>/<ol> (lists), and <li> (list items).
Inline elements: Do not start on a new line. They appear on the same line as the
preceding content, as long as there's space.
Only take up as much width as necessary, not the full width of the parent element.
Cannot contain block elements, only other inline elements or text. Common inline
elements include <span>, <a> (links), <img> (images),
-Know how to apply an on page anchor - ANSWER-An on page anchor is anything like
"home" or "Go to top of page" you can apply them by using:
<a>Go to top of Page </a>
If you want it to become a link then you need to use:
<a href=""
Don't forget to give an ID to the place you are trying to link to for on page links. For
example:
<li id="edu">Education
Then up on the href put:
<a href="#edu">Education</a><br>
, -Understand br's (breaks) - ANSWER-<br> is a self closing tag. It creates a break of
space in your code. You can put:
Lydia Pruitt <br>
Spanish Major
...and you wouldn't need to close it
-Understand comments in html - ANSWER-<!--This is a Comment-->
-Understand how to apply a style to a div ex. <div class="common na"> - ANSWER-A
<div> helps us assign attributes from a style sheet to our page. For example:
<div class="leftmenu">Left Menu</div>
On my stylesheet I have a portion called .leftmenu, and this code tells it to assign "Left
Menu" to this style type.
-Understand how to BOLD something - ANSWER-(font-weight: bold;) or, <b>
-Understand how to center text - ANSWER-You can center text in CSS using text-align:
center;
-Understand how to change the font color - ANSWER-In a stylesheet you can make
something called:
.newfont{
color: green;
{
-Understand how to navigate your directory using html (<a href ="html/resume.html"> -
ANSWER-If a file is in the same directory just use the file name
ex. <a href="resume.html">Resume</a>
If a file is in a sub directory then include the directory and the file name. ex. <a
href="html/resume.html">Resume</a>
To reference a file in a parent directory, use ../ to move up a level in the directory.
Example: If your current file is in the html directory and you want to link to a file in the
parent directory, use <a href="../resume.html">Resume</a>
To reference from the root directory (the base directory of your website), start the path
with /.
ex. <a href="/html/resume.html">Resume</a>
-Understand ordered and unordered lists - ANSWER-Unordered lists (<ul>) are used
when the order of the item is not important, using bullet points.
Ordered lists (<ol>) are used when the order of the item IS important, numbering them.
Here is an example:
<ul>