CCT260H5 Lecture Notes - Lecture 5: Html Attribute, Creative Commons, Xml

44 views3 pages
Day 5, Week 3
Simple website folder structure
Root (folder)
o Images (folder)
.jpg (file)
o Index.html (file)
o _css (folder)
.css (file)
Test your file paths
Relative = provides a file path that is related to the current page (likely pointing to a file in the
images folder)
o Eaple: <ig sr=/iages/fileae.jpg
Absolute = provides the complete URL to an online file
o Example: <img src=http://...ca/image/filename.jpg
Check images
o Test image path
<img src=alt=style=>
Check style sheet
o Test style sheet path
<link> in <head>
HTML elements continued
o Block elements start on a new line and takes up all available space (width)
Example: <div>, <table>, <blockquote>
o Inline elements do not start on a new line and only take the space need
Example: <span>, <strong>, <a>, <img>
o <di> ad <spa> oth defie setios of a htl douet
HTML attributes
o Class attribute specifies one or more classnames for an element
Class attribute mostly used to point to a class in a style sheet
Can be used similarly for JavaScript as well, denoted with (.)
o ID attribute specifies a unique id for an HTML element (value must be unique within
HTML document)
Most used to point to a style in a style sheet, and by JavaScript (via the HTML
DOM) to manipulate the element with the specific id, denoted with (#)
o Class vs. ID explained:
ID selector is used to specify a style for a single unique element, the ID selector
uses the ID attriute of the HTML eleet ad is defied ith a #. Class. The
class selector is used to specify a style for a group of elements
Layout: New Elements HTML5
<header> and <footer> - previously used block elements <div> to create and style accordingly
o New elements help search engines separate content from important info for users
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows page 1 of the document.
Unlock all 3 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents