Professional Documents
Culture Documents
Document Structure
CHAPTER 1
CSS specification describes a priority scheme to determine which style rules apply if more
than one rule matches against a particular element (hence cascading)
An online reference for the full HTML syntax can be found at the link below:
http://www.w3schools.com/tags/
h1 headings will be typically the most prominent (unless you change their styling in CSS)
Search engines typically look for h1 tags (after title tags)
title tags are used to provide a descriptive name for a web page
E.g., <title> My York University Home Page </title>
<ol>
<li> First Item </li>
<li> Second Item </li>
<li> Third Item </li>
</ol>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title> An HTML Page </title>
</head>
<body>
<! – Your web page contents follows this comment tag -->
</body>
</html>
Line 3: Starts the section that tells the browser how to display the page
Line 4: Identifies the character encoding to use
Line 5: identifies the text to display at the top of the browser window when this page is rendered
Line 7: Starts the section that contains your actual content
Line 8: This is a comment. Comments are not displayed on the web page.
<body>
<h1>Types of Guitars</h1>
<p>Guitars come in two main types: electric and acoustic.</p>
<h2>Acoustic Guitars</h2>
<p>Acoustic guitars have a large hollow body that projects the sound of the strings.</p>
<h3>Nylon String Acoustic Guitars</h3>
<p>Descendants of the gut-strung instruments of yore, nylon string guitars have a mellow tone.</p>
<h3>Steel String Acoustic Guitars</h3>
<p>Steel string guitars first appeared in country music and today most acoustic guitars have steel strings.</p>
<h2>Electric Guitars</h2>
<p>Electric guitars have a solid or hollow body with pickups that capture the string vibration so it can be amplified.</p>
<h3>Solid Body Electric Guitars</h3>
<p>Solid body electric guitars are commonly used in rock and country music.</p>
<h3>Hollow Body Electric Guitars</h3>
<p>Hollow body acoustic guitars are commonly used in blues and jazz.</p>
</body>
</html>
<body>
<h1>Types of Guitars</h1>
<p>Guitars come in two main types: electric and acoustic.</p>
<h2>Acoustic Guitars</h2>
<p>Acoustic guitars have a large hollow body that projects the sound of the strings.</p>
<h3>Nylon String Acoustic Guitars</h3>
<p>Descendants of the gut-strung instruments of yore, nylon string guitars have a mellow tone.</p>
<h3>Steel String Acoustic Guitars</h3>
<p>Steel string guitars first appeared in country music and today most acoustic guitars have steel strings.</p>
<h2>Electric Guitars</h2>
<img src="images/guitar.jpg" alt="Electric guitar" />
<p>Electric guitars have a solid or hollow body with pickups that capture the string vibration so it can be amplified.</p>
<h3>Solid Body Electric Guitars</h3>
<p>Solid body electric guitars are commonly used in rock and country music.</p>
<h3>Hollow Body Electric Guitars</h3>
<p>Hollow body acoustic guitars are commonly used in blues and jazz.</p>
</body>
</html>
If it is downloaded press Shift+F2 and it will show up at the bottom of the browser window
Click on the Inspector tab; as you scroll to different elements in your HTML source, the browser
window highlights the space occupied by that element
Block elements occupy a box much larger than the text
Slightly greater in height
Extending over across the entire width of the window (their parent is body)
When you highlight the tag body, you see it occupies the entire browser window
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Stylin' with CSS - Figure 1.4 Block and Inline Elements</title>
</head>
<body>
<p> A quote on guitars: </p>
<blockquote> “ Sometimes you want to give up the guitar, you’ll hate the guitar.
But if you stick with it, you’re gonna be rewarded. ”
<cite> Jimmy Hendrix </cite>
</blockquote>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Stylin' with CSS - Figure 1.4 Block and Inline Elements</title>
</head>
<body>
<p> It is <strong> absolutely critical </strong> that <em> everyone </em>
does this <abbr title=“as soon as possible”> ASAP </abbr>!</p>
</body>
</html>