In this demo/exercise, you will transform a simple set of text into a funcional web page.
Below is the start of our web page, it consists of just some text. Your job is to add the HTML to give the page some structure. To get started, click on the "Edit on CODEPEN".
<h1> ... </h1>
)<p> ... </p>
)My First Webpage
This is my first attempt at making a webpage and it is turning out to be really easy. I am glad that I have taken the time to read the instructions and am following step by step.
When I am finished, I plan on using my new skills to create a real webpage to show off my collection of pug photos. Here is a example!
See the Pen AGLA Intro to Web (1) by Rob Banning (@rbanning) on CodePen.
Great, now lets add some style. Below is what your markup should look like. Click on "Edit on CODEPEN".
<h1>My First Webpage</h1>
<p>This is my first attempt at making a webpage and it is turning out to be <strong>really easy</strong>. I am glad that I have taken the time to read the instructions and am following step by step.</p>
<p>When I am finished, I plan on using my new skills to create a real webpage to show off my collection of <a href="http://goo.gl/HQ6OfK">pug photos</a>. Here is a example!</p>
<img src="http://goo.gl/aWhiFb" />
See the Pen AGLA Intro to Web (1-complete) by Rob Banning (@rbanning) on CodePen.
Fantastic, now let's add some action to the page. Below is what your CSS should look like. Click on "Edit on CODEPEN".
body {
font-size: 20px;
font-family: sans-serif;
padding: 20px;
border: solid 10px orange;
}
h1 { color: blue; }
strong {
text-transform: uppercase;
color: green;
}
a {
color: red;
}
img {
display: block;
margin: 100px auto;
transform: rotate(-15deg);
}
See the Pen AGLA Intro to Web (3) by Rob Banning (@rbanning) on CodePen.
Excellent. Below is what your Javascript should look like.
$('img').click(function() {
$('img').fadeOut(500);
});
$('h1').click(function() {
$('img').fadeIn(500);
});
See the Pen AGLA Intro to Web (3-complete) by Rob Banning (@rbanning) on CodePen.