{"id":118,"date":"2015-01-20T11:48:48","date_gmt":"2015-01-20T18:48:48","guid":{"rendered":"https:\/\/rmu.andrewyames.com\/?page_id=118"},"modified":"2019-07-30T09:16:33","modified_gmt":"2019-07-30T13:16:33","slug":"week-2-links-images-and-css-basics","status":"publish","type":"page","link":"https:\/\/rmu.andrewyames.com\/?page_id=118","title":{"rendered":"Week 2: Links, Images and CSS Basics"},"content":{"rendered":"<h1>Links<\/h1>\n<p>Linking to internal files, external sites and email addresses all use the a tag and its href attribute. Linking to an external site must always use an absolute address,<br \/>\nfor example:\u00a0<span style=\"color: #339966;\">&lt;a href=\u201dhttp:\/\/google.com\u201d&gt;<\/span>google<span style=\"color: #339966;\">&lt;\/a&gt;<\/span><\/p>\n<p>Linking to an email address is similar, but the mailto: property is added,<br \/>\nfor example:\u00a0<span style=\"color: #339966;\">&lt;a href=\u201dmailto:ames@rmu.edu\u201d&gt;<\/span>Andrew Ames<span style=\"color: #339966;\">&lt;\/a&gt;<\/span><\/p>\n<p>Linking to internal files require a relative address and close attention to file management must be paid. For example to link to another file my HTML would look like this<br \/>\n<span style=\"color: #339966;\">&lt;a href=\u201dsomeotherfile.html\u201d&gt;<\/span>some other file on my site<span style=\"color: #339966;\">&lt;\/a&gt;<\/span>\u00a0and require that the files being linked be in the same folder.<\/p>\n<h1>Images<\/h1>\n<p>Linking to images is similar to linking to files, they can be linked absolutely or relatively, however, they use the img tag and the src, width, height and alt attributes. For example a photo linked realativly would look like this:\u00a0<span style=\"color: #339966;\">&lt;img src=\u201dyourphoto.jpg\u201d height=\u201d100\u2033 width=\u201d100\u2033 alt=\u201dthis is a photo of me\u201d\/&gt;<\/span>\u00a0note that the img tag does not have a closing tag.<\/p>\n<h1><strong>\u00a0Document<\/strong> types<strong> and Character sets<\/strong><\/h1>\n<p>As there are now 5 versions of HTML, you want to set your document type so browsers know what version you are using. We will be using HTML 5 in the class so each of your documents should now start with :<br \/>\n<span style=\"color: #339966;\">&lt;!doctype html&gt;<\/span>\u00a0This comes directly before the &lt;html&gt; tag<\/p>\n<p>It is also important to note, web pages can be done in a number of languages, so a character set should be set as well. We will be using the western standard UTF-8. This is set using a meta tag inside the head.<br \/>\n&lt;head&gt;<br \/>\n<span style=\"color: #339966;\">&lt;meta charset=\u201dUTF-8\u2033&gt;<\/span><br \/>\n&lt;title&gt; page title &lt;\/title&gt;<br \/>\n&lt;\/head&gt;<\/p>\n<h1>CSS basics<\/h1>\n<p>To make your HTML look good we need Cascading Style Sheets, CSS. With CSS we tell our HTML tags how we would like them to look using rules. CSS rules are made up of Selectors and at least one Declaration. Declarations are made up of one property and its values.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/w3schools.com\/css\/selector.gif\" alt=\"\" \/><\/p>\n<p>A Selector can be any HTML element. For example if you wish to style your Paragraph &lt;p&gt;&lt;\/p&gt; you\u2019d simply start with\u00a0<span style=\"color: #ff00ff;\"><strong>p<\/strong><\/span>\u00a0then place your declarations between curly brackets <strong><span style=\"color: #ff00ff;\">{ }<\/span><\/strong>.<\/p>\n<p>Declarations define how things look through various properties like font, color, width, margin, boarder, etc. So to continue our example, if we wanted to style our paragraph by making the font arial, 12point and grey that is double spaced our rule would look like this:<\/p>\n<p><span style=\"color: #ff00ff;\">p {<\/span>font-family:Arial; font-size:12pt; color:#666666; line-height:24pt;<span style=\"color: #ff00ff;\">}<\/span><\/p>\n<p><strong>In-class<\/strong>: Continue work on your homepage and complete the following:<\/p>\n<ul>\n<li>Edit bio for spelling and grammar<\/li>\n<li>Add links to your email address and influences and top 5 sites<\/li>\n<li>Add a link to the 1st mini project<\/li>\n<li>Add a photo of yourself<\/li>\n<li>Add CSS to style backgrounds, colors, margins and the fonts of the HTML tags you have already used.<\/li>\n<li>Upload changes and photo to the server, if not completed in class have posted before the start of class 3.<\/li>\n<\/ul>\n<p><strong>Mini Project<\/strong>: Style the miniproject.html (which is in my pass outs folder) file by adding CSS. Give it an aesthetically pleasing look and increase its legibility by applying basic design principles. Be sure to include a doc type and character set to avoid strange characters from appearing. Style the body, paragraphs, lists and headings with a minimum of 7 declarations for each selector. Upload to the server and be sure to add a link to your project on your home page.<\/p>\n<p><strong>Read:\u00a0<\/strong><a href=\"http:\/\/andrewyames.com\/_classes\/artm2210\/Principles%20of%20Beautiful%20Web%20Design%20Chapter%201.pdf\" target=\"_blank\" rel=\"noopener noreferrer\"><em>The Principles of Beautiful Web Design<\/em>: Chapter 1: Layout and Composition<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Links Linking to internal files, external sites and email addresses all use the a tag and its href attribute. Linking to an external site must always use an absolute address, for example:\u00a0&lt;a href=\u201dhttp:\/\/google.com\u201d&gt;google&lt;\/a&gt; Linking to an email address is similar, but the mailto: property is added, for example:\u00a0&lt;a href=\u201dmailto:ames@rmu.edu\u201d&gt;Andrew Ames&lt;\/a&gt; Linking to internal files require &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/rmu.andrewyames.com\/?page_id=118\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Week 2: Links, Images and CSS Basics&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":27,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-118","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/rmu.andrewyames.com\/index.php?rest_route=\/wp\/v2\/pages\/118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rmu.andrewyames.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/rmu.andrewyames.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/rmu.andrewyames.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rmu.andrewyames.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=118"}],"version-history":[{"count":5,"href":"https:\/\/rmu.andrewyames.com\/index.php?rest_route=\/wp\/v2\/pages\/118\/revisions"}],"predecessor-version":[{"id":3885,"href":"https:\/\/rmu.andrewyames.com\/index.php?rest_route=\/wp\/v2\/pages\/118\/revisions\/3885"}],"up":[{"embeddable":true,"href":"https:\/\/rmu.andrewyames.com\/index.php?rest_route=\/wp\/v2\/pages\/27"}],"wp:attachment":[{"href":"https:\/\/rmu.andrewyames.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}