H151 - Review Week 1
- Many tags do not have to be closed such as the
<p>tag and the<li>tag. Why is it important to have an opening and a closing tag when using STYLES?The closing tag tells the browser that the style definition is complete. Without this, the browser will not display any of the page content.
- What is an inline style? Please provide an example.
Style defined within the context of the document.
<span style="color:#ff0000;background-color:transparent;font-weight:bold;">This text is red and bold</span> - What is a document level style? Please provide an example.
Style defined in the head of the document.
<style type="text/css">
body {color:#000000;background-color:#ffffff;}
td {font-size:13px;color:black;cursor:default;}
a {color:#970617;text-decoration:none;}
</style> - What is a linked style? Please provide an example.
Style defined in an external document that is linked from the head of the document.
<link rel="stylesheet" type="text/css" href="class.css" name="Default"> - In the CSS code
h1 { font-family: helvetica, arial, sans-serif; }, which font value is given first priority?- helvetica
- arial
- sans-serif
- all have equal priority
a.
- What does the cascade refer to in Cascading Style Sheets?
Cascade refers to the order of priority that rules are given. In order: Linked (least), document, inline, reader (most).
- All class names begin with
- a comma (,).
- a pound sign (#).
- a period (.).
- a quotation mark (").
c.
- Convert the following statement using CSS.
<font color="#008000" face="Arial">This text is green and in Arial font</font><span style="color:#008000;background-color:transparent;font-family:Arial,sans-serif;">This text is green and in Arial font</span>