In terminal, navigate to your website's root directory. Use mkdir to create a new directory called week2 to house this week's exercises. Then use touch to make the hompage for this directory.
HTML with the proper syntax. Most modern browers will interpret invalid HTML correctly, but it is not a good idea to leave it that way - your page might not look correct in other browers, older browers, on mobile or in newer versions of browsers. Think of it as using bad grammer.
<tagname>content</tagname>
<!DOCTYPE html>
<html>
<head>
</head>
<body>
</body>
</html>
A sketch of your web page and what information goes on it. It groups your content, defines the hierarchy of information and how much space each part takes up.
Wireframes help us to think through and define which pieces of information are most important and help us commicate that to users through space and layout. It is helpful to work out these questions before you being coding.
You can think of each HTML element or tag as a box. Your layouts are built by arranging your boxes on the page. You can envision each box of a wireframe as a separate HTML element.
Go to NPR.org. On a piece of paper, draw out a wireframe for this page.
All text on your page should fall inside of one the following categories.
In most cases, nearly all the body text on your pages should be inside <p></p> tags. This ads a line break and space between paragraphs by default.
Using the theme "My Favorite Books" - add the following to your Week 2 page:
A full URL that points towards a web page that is not the one you are linking from.
<a href="http://nytimes.com">NY Times</a>
A URL pointing to a file or directory on your site. You do not need to specify the domain in these URLs.
<a href="about.html">About Me</a>
A URL pointing to an element within a page.
<a href="#contact">Contact Form</a>
A link that opens a user's default email program and fills in your specified email address.
<a href="mailto:me@gmail.com">Email Me!</a>
You can use the target attribute to have a link open in a new tab or window.
<a href="http://facebook.com" target="_blank">Facebook</a>
Add a link to your page allowing users to email you.
Best type for images with fewer and bolder colors. Good for illustrations and graphics.
Best type for images with many colors. Best to use for photographs.
Transparent background. Typically used for graphics and icons.
Once you have cropped, sized and saved your images as the correct type, place your image file in a directory named images.
Create an images directory in your site. Grab an image from your computer or a Google image search and save it to your images directory. Then use the img tag to add it to your page.
Block level elements always appear to start on the same line.
Examples: <h1>, <p>, <li>
A block-level container element used to group sections of content
<div><p>Content goes here</p></div>
Inline elements always appear to start on the same line.
Examples: <a>, <em>, <img>
An inline container element used to group elements on the same line, usually text.
<span>Sentence text</span> goes here.
An attribute used to identify the content and target using CSS. IDs can only be used once on a page.
<div id="navigation"></div>
An attribute used to identify content and target multiple elements at once using CSS. Classes can be used many times on a page.
<div class="section"></div>
Use this syntax to make notes for yourself on your page. When formatted correctly, comments will appear gray in your text editor.
<div></div><!--END SECTION-->
You can also use the same syntax to hide code that you don't want to show on your page but you still want to keep in your file.
<!-- <div>Hide this box.</div> -->
Add a comment to your page
One of the best ways to start troubleshooting is to check your console. Open up your website in a browser and open the developer tools. Your console provides a place for you to inspect the HTML and styles (both defined and computed) on the page.
Open up your Week 2 page in Chrome. Use cmd + alt + i or right click and select Inspect Element to open up the developer tools. Under the Elements tab you can look through the markup on your page (or any page).
Draw out a wireframe for your Week 2 homepage for creating a list of your favorite books (or movies or musicians or periodicals). Use this page as a guide for the kind of information you will need to include. At minimum include a title and description for the page and a title, author name, description and image for each item.
Translate your wireframe into code on your Week 2 homepage. You can alter the content we added in class. Add actual content but don't worry about the design (everything will be stacked) - concentrate on using the appropriate markup for your content.
When you are finished with your work on your homepage and in Week 2, use your add, commit and push commands to upload your repo. Complete this by next Monday.