HTML / CSS – Basics II You have the content. Now make it look nice.
-
Upload
lambert-jessie-shepherd -
Category
Documents
-
view
220 -
download
0
Transcript of HTML / CSS – Basics II You have the content. Now make it look nice.
Back to the HTML-Structure
<html><head>
<title>Some Title</title></head><body>
<p>Some <em>content</em></p>
</body></html>
Syntax
h1 { font-size: 16pt; color: green;}
Selector Property Value and Unit
Property Value
Declaration
2. Embedded Style Sheet
<style type="text/css"><!--
p { font-size: 9pt; }--></style>
Only this documentdw
3. External Style Sheet
<link href="styles.css" rel="stylesheet" type="text/css" />
All the documents;Change once, apply to all (Hooray!)
dw
2. Class and ID Selectors
.red {color:red;
}
Triggers the style of an HTML tag that has the attribute class="red"
Appears as often as you wishdw
2. Class and ID Selectors
#menu {margin:0px;
}
Triggers the style of an HTML tag that has the attribute id="menu"
Appears only oncedw
3. Special Selection
Contextual#menu ul { list-style:none; }
Short Hand#content, #footer
{ width:750px; }
Pseudoselectorsa:hover { color:green; }