Power System Analysis John Grainger 1st
Power System Analysis John Grainger 1st
Power System Analysis John Grainger 1st
http://learnBuildCode.com
Downloading your tools
The only tool you will need is sublime text, a text
editor used for programming/coding.
<!DOCTYPE html> Then a html opening tag and a closing html tag at the bottom. Closing
<html> tags have a forward slash at the start of them to distinguish them from
opening tags.
<head>
<title>The title of the webpage</title>
</head> Then there is a opening and closing head tag, The head tags contain
information that sets up the webpage, this information does not get
<body> displayed on the screen.
<p>A paragraph of text.</p>
</body>
In the body tags is all the content that gets output to the screen. The
tags themselves do not get output but the content in them does.
</html>
In the body tags is a set of paragraph tags the p’s, The text inside the p
tags gets output to the screen. Not the <p> tag.
The <body> tags show any visible information or The <h1> tag can be used for a web page heading,
content. and the <p> tag can be used to describe a
paragraph.
What makes up a tag?
A tag is made up of a word or letter such as body, <body></body>
and is surrounded by angular brackets.
<tagName>Content</tagName>
HTML tags usually come in pairs, however not
always. The first tag is an opening tag, and the
second tag with a forward slash at the beginning is
a closing tag.
HTML
The Basics
HTML Headings
<h1>The largest heading</h1> Headings are defined with a h tag followed by a
number. The largest heading or title you can have
<h2>A sub heading that is on a page is made with the h1 header tag.
smaller</h2>
The smallest heading you can have on a page is the
<h3>An even smaller heading</h3> h6 heading tag.
<h6>The smallest heading</h6> Try out the examples on the left, heading tags
range from h1 to h6.
HTML Paragraphs
Paragraph tags consist of angle brackets with just a <p>What is the meaning of life?</p>
letter p in them.
<p>To have fun of course!</p>
Nothing too fancy.
Try out the code above! Inside the opening <a> tag you will see a href attribute. This
stands for hyperlink reference. Here we put the url of the
website that you get directed to if you click the link. The url
must be between quotes.
Between the <a> tags is some text Google, This text can be
anything. The text is what gets displayed. If you click the
text then you get redirected to the href website.
HTML Images
The image tag is a bit different, it is just one tag. It doesn’t
have an opening and closing tag, it is self closing and
consists of a single img tag.
<img src=”http://publicdomainarchive.
The image tag has an src attribute which stands for source.
com/wp-content/uploads/2014/03/public-
This attribute should contain a url of the path to the image
domain-images-archive-high-quality-
file. If you look at the url in the example you can see it goes
resolution-free-download-0036-1080x675.
to the publicdomainarchive website then at the end you can
jpg” alt=”An image of a bike” >
see it ends in jpg format which is a type of image format.
The alt attribute is text that gets displayed when you hover
over the image, it is a descriptive snippet of information.
The text will also get displayed if the image can’t be loaded
or it will get read by a screen reader if one is being used.
Html tags can have attributes
in quotes “google.com”.
You also have the alt attribute to display alternative text
when an image can’t be loaded:
HTML lists
bullet points.
For every new item you put in the unordered list <li>Tea</li>
you must use an <li> tag.
<li>Milk</li>
</ul>
</ol>
Inside the unordered list add three blank opening and closing li tags.
Inside each li tag add an anchor tag that goes to a website. <li><a href=”www.mypage.com” >My Page</a></li>
Hello
The div element is used as a container for other elements. Here it surrounds a paragraph element.
If you try this example you will see that the only thing on the screen is the text “Hello”.
This is because you will need to add css styles to the div element in order to see it.
Divs are commonly used to style a certain block of content.
The Span Tag
The span tag is commonly used to add a container Span example:
around something very specific such as a word in a
<p>Hello <span>World</span></p>
paragraph.
Div example:
CSS styles can then be applied to the span tag to
make the word coloured or bold. <div>
Span tags are used for very specific content <p>Hello there</p>
whereas div tags are used for larger blocks of
<p>This is another one</p>
content, like styling multiple paragraphs.
<p>Three paragraphs in total</p>
</div>
HTML Tables
HTML tables start with a table tag. <table></table>
<tr>
As you can see from your own output to the screen the first row <td>Cell 1</td>
contains three table data cells the first which is cell1 and then cell2 and
cell3. <td>Cell 2</td>
<td>Number 3</td>
Then below the first row is the second row containing the names Jack,
Will and Fred.
</tr>
Tables are not used as much as they used to be however are still very <td>Jack</td>
useful. A lot of financial websites will use tables to display information,
and if you take a look you can also see that they can be styled very <td>Will</td>
nicely as well.
<td>Fred</td>
</tr>
</table>
HTML Classes
You can add a class attribute to a html element. <div class=”blog-post”>
This allows you to more easily target that element <h2>A Journey to France</h2>
An id is for naming something once. If you giv a div tag an id of first- <p>On my journey I visited many
post then no other id attribute can be named the same thing. cities and visited many different
locations, however the one ...</p>
Id attributes are another way to style something very specifically. If you
want all blog posts to have white text and black backgrounds but want </div>
the first blog post to be red and white then you can give the first blog
post an id attribute as well.
Basic forms and input
You can use a html form to collect user input,
You create a form with opening and closing form tags
<form>
<input type=”text” name=”username” placeholder=”
Enter a Username”>
</form>
The input element is the most important form element, it has many
different types such as text and radio and submit.
It has a href attribute which just like the anchor tag is used
The link element is empty apart from its
to point to the location of a resource. The example points
attributes.
to the styles.css file in the same folder.
It must only be placed in the head tags
There is a type attribute which lets the browser know what
of a html document.
type of file it is, the stylesheet is type text/css.
The head tag is where we place
There is also a rel attribute which stands for relationship.
information about the web page, it will
The relationship between the index and css document is
not get displayed.
that again the file is a stylesheet.
You can use a link tag many times to import many different
files if you want to. The link tag goes in the head tag at the
top of the page.
Add your link tag
In your index.html file add your link tag inside the head tags.
The most important attribute is the href attribute. Since both files are in the same folder you can use a relative path href=”
styles.css” (The relative path is the name of the file, we don’t need to specify the folder name of “websites” as both files are in
the same location).
Absolute paths are links that contain the full website address.
We don’t actually have a website set up, so we use relative links. (You would use relative links in a real website as well.)
The coffee cup website has a good explanation of relative vs absolute links if you are interested.
<head>
</head>
On the next page is a css example,
update your index.html and styles.css
}
<body>
<p>Hello World<p>
Don’t copy this below just the css above:
</body>
(Make sure you use curly brackets)
The Result
You will see the paragraph text
has changed colour.
CSS is a language that
describes presentation
body {
background-color: blue;
Selector { property: value; } Finally a value is given for the property. What color do we
want the background to be? The value in the example is
blue.
CSS colors can be defined with:
CSS Colors
Color Names,
p { color: red; }
As you can see there are quite a few options, if you p { color: black; }
can think of a colour then it is quite likely there is
body { background-color: yellow; }
a color name.
body { background-color: orange; }
Color names are however restricting, using one of
the methods covered next gives you a lot more body { background-color: firebrick; }
flexibility.
RGB Color Values
Red:
p { color: rgb(255,0,0); }
rgb(red, green, blue)
Green:
The rgb color scale runs from 0 to 255.
p { color: rgb(0,255,0); }
255 is the strongest and 0 weakest. You can use the scale to
Blue:
make any combination of colours by specifying different
levels for the red, green and blue.
p { color: rgb(0,0,255); }
Hexadecimal values can be recognized because of the # sign If you change the hex value from the highest red to this:
in front of the letter and number combinations.
#f50000 then you end up getting a slightly darker shade of
A hexadecimal color is made up of 6 characters. 2 red 2 red.
green and 2 blue. #rrggbb two red characters and 2 green
#f00000 would be an even darker red as the second value is
and 2 blue.
0.
If 0 is the darkest then we could represent black as #000000
If you wanted an even darker red you could do #900000
This shows red green and blue each at their lowest value.
which ends up being a brownish red.
Blue: #0000ff
Again don’t worry about memorizing colour values Yellow: #ffff00 (red and green)
there is no need, just google a colour such as light
Shade of green: #77AA77
blue hex value and you will be able to get what you
need. Shade of purple: #992299
It does help if you understand how hex values Light grey: #eeeeee
Here are some more examples to help: #ffffff -> #fff or #000000 -> #000
CSS page:
Target the body tag and change the background color to lightblue.
Target the h1 tag and:
Change the color to white,
Change the background to red,
Change the text to align center using: text-align: center;
Borders
The properties you are specifying in the shorthand
are:
You can have a wide variety of borders, the values border: width style color;
The shorthand border property is: You can also specify a single border if you wish:
CSS page:
Target the h2 tag and:
Change the color to green,
Change the text align to center,
Add a top border that is 4px wide, double for the style and
coloured green,
Add a bottom border that is 4px wide, solid for the style and
coloured light grey.
CSS Margin
Margin shorthand property is
CSS page:
Target the second paragraph with the margin-paragraph class.
Do this by placing a dot/period/full stop in front of the class name.
.margin-paragraph { }
The dot is the syntax we use to target a html class in our CSS stylesheets.
Give the paragraph a 1px border, solid that has a colour of
firebrick.
Give the paragraph a margin-top of 50px.
Margin can be set to auto
Index page:
Add a div tag and inside add the text “A div container with auto margin”
CSS page:
Target the div tag and:
Add a solid border that is 1px wide and coloured red,
Refresh the page,
Now change the width to 500px, width: 500px;
Finally set the margin to auto.
CSS Padding
Padding shorthand is just like margin shorthand:
Padding-top
Padding-right
Padding-bottom
padding-left
Challenge
Index page:
Add a paragraph with some text in it.
CSS page:
Target the paragraph tag:
Give the paragraph a 1px border coloured green and make it
solid,
Save and refresh the page.
Next add some top padding of 50px,
Save and refresh again to see the changes,
Add a background-color of lightblue to the paragraph,
Add 50px of padding-bottom
Save & Refresh,
Add 100px of padding-left.
Cool hopefully you are starting to see how margin and padding work.
Make a CSS button
Index page:
Add a div tag,
Inside that div tag add an anchor tag with the text “Join Now”, give the anchor tags href
attribute a value of “#” like this:
<a href="#">Join Now</a>
CSS page:
Target the div tag:
Make the text align to center in the div tag,
Give the div tag a margin-top of 50%, - This shifts the div tag down 50% of its
parent container. What is the parent container? For this div tag it is the page(body tags) for
the anchor tag the parent is the div tag.
Target the anchor tag inside the div tag like this:
div a { } - A space between the word div and anchor means
target all anchor tags inside div tags. Look at your anchor
tag, it is inside the div tag. Check your html if you need more
clarification.
(save & refresh after each step to help understanding)
Set the text-decoration to none,
Give it a background color of #191,
Change the text color to white,
Add padding of 1em top, 2em right 1em bottom and 2em left,
em is another unit, it is a relative unit.
Use text-transform and set it to uppercase,
Use font-weight and set it to bold,
Set a bottom border 4px wide that is solid and coloured #333,
Now create a new css rule like this:
a:hover { }
Here you target the anchor tag with a, you then type colon hover :hover
which means apply this style anytime you hover over an anchor tag.
Cool the button background colour becomes lighter when you hover
over it!!
Well done there were quite a few things covered in this little button
tutorial, Give yourself a pat on the back.
Button challenge code
CSS page:
div {
text-align: center;
margin-top: 50%;
If you got really stuck here is the way I coded the }
button, Note that there are many ways to achieve div a {
the same result. text-decoration: none; /*Remove underline*/
background: #191;
color: white;
Index page: padding: 1em 2em 1em 2em;
text-transform: uppercase; /*upcase the text*/
font-weight: bold; /*Bold the text*/
<div> border-bottom: 4px solid #333;
<a href="#">Join Now</a> }
</div>
a:hover {
background-color: #1c1;
}
Height and Width
You can add the height and width of an element like so:
div {
height: 200px ;
width: 200px;
background-color: #999;
}
Height and Width
Index page:
<div>Make me a box</div>
<div>Me too</div>
CSS page:
div {
height: 200px;
width: 200px;
background-color: green;
margin: 25px; /*25px of margin on every side */
}
<div>50% please</div>
CSS page:
div {
border: 2px solid green;
max-width: 50%;
}
The div gets set to a maximum of 50% of the page, as that is the parent
of the div. Look at your html and you will see the div nested inside the
body tags.
If you resize the page the div will also resize, never getting wider than
50% of the page size.
If you have a width property in your CSS rule and a max-width property
then the max-width will override the width property. It has a higher
specificity.
Min Width
Index page:
<div>Welcome Visitor</div>
CSS page:
div {
color: white;
background: #f59;
text-align: center;
padding: 20px;
min-width: 500px;
}
letter-spacing: 4px;
letter-spacing: -1px;
You can align text with the text-align property.
You have already used center to align text in the center of the page. If you have a paragraph and want more or less of a gap between the
Other values are left, and right. lines to make it easier to read then you could use line-height.
You have also briefly seen the text-decoration property, which line-height: 1.3;
can be used to add underlines, overlines, lines through the text or as we line-height: 0.7;
did with a link remove the decoration all together. line-height: 1.9;
text-decoration: none; Note that line height doesn’t have a unit such as px or em, just a
text-decoration: overline; numeric value. The number is multiplied by the font-size of the
text-decoration: underline; element. You can have a unit if you wish such as 5% or 2em. The
text-decoration: line-through; unitless number value is preferred as you won’t get unexpected results.
You have also seen text-transform which can be used to change text to
upper or lower case.
text-transform: uppercase;
text-transform: lowercase;
text-transform: capitalize;
Capitalize only changes the first character of each word.
Line height, Letter spacing
Index page:
<h1>Click Here</h1>
<p>Lots of text here Lots of text here Lots of
text here Lots of text here Lots of text here Lots
of text here Lots of text here Lots of text
here</p>
CSS page:
h1 {
letter-spacing: 5px;
}
p {
line-height: 1.9;
}
Font
Font style can be used to alter the way text looks such as italicised or
oblique.
font-style: normal;
You can change the font with the font-family property. You can specify font-style: italic;
a general font like serif, or sans-serif or monospace or you can be font-style: oblique;
specific and use a font in that generic family such as arial or verdana
which are both sans-serif fonts. Times new roman is a specific font from If you want to make a font larger or smaller on the page then you use
the serif family. font-size.
font-size: 30px;
font-family: “Times New Roman”, serif; font-size: 2em;
If the font name is more than one word then surround it in quotes. If font-size: 100%;
you specify more than one font family then separate them with a
comma. 1em is equal to whatever the current font size is. The default font size
Here Times New Roman is specifically used, however if a computer starts at 16px in browsers. So 1em will equal 16px unless you alter it.
does not have that specific font we have said just use any serif generic This means that a font-size of 2em is equal to 32px, Play around with it.
font you have. It is a relative unit as its value it relative to the font-size that is currently
set. Whereas a px is absolute it is not relative to anything else.
font-family: Arial, sans-serif;
Here we say specifically use an Arial font which is part of the generic You have also seen font-weight which was used to bold the text.
sans-serif family. However if a computer does not have that font then font-weight: bold;
just use any generic sans-serif font. As you can see the order matters. font-weight: normal;
Box Model
Margin
Border
Padding
Essentially every html element can be thought of as a box. The box model is just a box that wraps around every element and you
have been doing it this whole time. The box is made up of a combination of the content, the padding, the border and the margin.
display: none;
The page will render as if it were there.
CSS page:
Target the li tag and change the display to inline.
Target the ul tag and change the text-align to center
Target the anchor tag and change the text-decoration to none
Change the anchor background color to lightblue
Give the anchor top and bottom padding of 1em and left and
right of 2em
Menu Code
CSS page:
ul {
text-align: center;
Index page:
}
<ul>
<li><a href="#">HOME</a></li>
li {
<li><a href="#">ABOUT</a></li>
display: inline;
<li><a href="#">CONTACT</a></li>
}
</ul>
a {
background: lightblue;
padding: 1em 2em;
text-decoration: none;
}
Inline-block
Another display value is inline-block.
Inline block elements are like inline elements but you can give them a width and a
height. Think of it as combining the inline value and the block value.
The element gets treated as if it were a block level element so you can then decide how
much space you want it to take up, but it can act as an inline element and have other
elements next to it!
COOL!
Position Property - relative
It is positioned relatively, it is 30px away from where it would have
been. There will be a gap from where you pushed the element, into its
new position, no other element will fill this gap that has been left.
Other elements will not move out of the way either. So you could
An element can be positioned in four ways. overlap elements.
Static, relative, fixed or absolute.
try :
Once the position property has been set you can then use the top, Index page:
bottom, left and right position properties. Depending on what position <div>Hello There</div>
value you use the outcome will be different. CSS page:
div {
By default html elements are positioned static. position: relative;
position: static; left: 50px;
border: 1px solid red;
If an element has a static position then it will not be affected by the top,
}
bottom, left and right properties.
Static position is not special, elements are just placed onto the page in
the normal flow, one after another.
If you set the position property to fixed then it will be positioned in Try out the example on the next page.
relation to the viewport, It will stay in exactly the same place even if the
screen is scrolled.
Think of a website whee you have scrolled down but a menu is always
there at the top of the page. That is fixed positioning. Or a menu on the
side of a webpage that has social media icons, As you scroll it is always
in the same place, That is fixed positioning. Very useful stuff.
With fixed positioning set you can use the top, bottom, left and right
properties to position an element on the page. If you want something
right at the very top of the page you can set top to 0. This means there
are 0 pixels or any unit between the element and the top of the page.
Fixed position footer
Index page:
<h2>Fix that down the bottom!</h2>
<div>
setting a fixed position;
</div>
CSS page:
div {
position: fixed;
bottom: 0;
right: 0;
left: 0;
text-align: center;
border: 5px dotted lightblue;
}
Position Absolute
Absolute positioning can be a little more confusing. An element that has absolute positioning is positioned relative to the nearest positioned
element.
If there is no other positioned element then the absolute positioned element is relative to the document body.
So if you have a div positioned relative, Then inside that div you add another div but position it absolute. If you set the absolute positioned divs
right and bottom values to 0 it will position that div relative to the outside div.
CSS page:
div.relative-div {
position: relative;
width: 500px;
height: 250px;
border: 5px solid red;
}
div.absolute-div {
position: absolute;
bottom: 0;
right: 0;
width: 50%;
height: 100px;
border: 1px dotted blue;
}
Overlapping elements
You can overlap html elements, and with the z-index property you can
specify the order of the elements.
Index page:
<h1>This is a heading</h1>
<div></div>
CSS page:
div {
background-color: firebrick;
height: 80px;
width: 500px;
border-radius: 10px;
position: absolute;
top: 0;
z-index: -1;
}
Float and Clear properties
The float property can be used to position elements on a page.
Index page:
<div class="right">Im on the right</div>
<div class="left">Im on the left</div>
CSS page:
.left {
float: left;
background: lightblue;
color: #fff;
padding: 1em 2em;
font-weight: bold;
}
.right {
float: right;
background: #1c1;
color: #fff;
padding: 1em 2em;
font-weight: bold;
}
Clear property
If you have the same CSS as the previous page but
add another div:
.bottom {
clear: both;
}
CSS page:
input {
margin-top: 1em;
padding: .5em 1em;
font-size: 1.2em;
border-radius: 10px;
}
input:focus {
color: #fff;
background: #333;
outline: none;
}
The focus pseudo class allows us to change properties when that input
field has focus. The outline property is set to none to remove the default
blue line that occurs when you focus on an element.
Navigation bar challenge
Index page:
Add an unordered list
In the ul add some li tags and add an anchor element inside each list
item.
CSS page:
Target the ul:
Set the padding and margin each to 0,
Set the background to #333,
Target the li:
Set the display to inline,
Target the anchor tags inside the list items:
Set the display to inline-block,
Set the text decoration to none,
Change the text color to white,
Add 1em of padding on the top and bottom and 2em of padding
on the left and right.
Nicely Done!
Navigation bar code
CSS page:
ul {
margin: 0;
Index page: padding: 0;
background: #333;
<ul> }
<li><a href="#home">Home</a></li>
<li><a href="#news">News</a></li> li {
<li><a href="#contact">Contact</a></li> display: inline;
<li><a href="#about">About</a></li> }
</ul>
li a {
display: inline-block;
text-decoration: none;
color: #fff;
padding: 1em 2em;
}
a:hover {
background-color: #191;
}
CSS3 the newest standard
The new features
I’m pretty sure you have seen this before,
Round the corners of any element.
Round corners
Cover scales the image so that the area you specify is completely
You can set a background image in CSS with
covered. The image height and width may exceed the elements area as
it is being scaled. It won’t overflow however so you will not see it. It will
background-image: url(‘a url path’); just mean some parts of the image are not visible.
Contain scales the image to be as large as possible but the width and
You can set the position with values such as center,
height of the image must still fit inside the element. So there may be
top bottom, left and right. areas of the element that are not covered by the background image.
background-repeat: no-repeat;
Background image
Find an image url you can use or add an image to your website's folder.
CSS page:
Taget the html tag (at a minimum it will always be the screen height):
html {
background: url('landscape.jpg');
background-repeat: no-repeat;
background-position: center center; /*horizontal
and vertically centered*/
background-size: cover;
min-height: 100%;
}
Set the background image with background and the url. Then set the
repeat to none. Set the position to center vertically and horizontally. Set
the size to scale and cover the area, in this case the html tags which are
as large as the whole page. Notice some of the image will be missing as it
has been scaled. Set the minimum height to be 100% of the html tag
height. Otherwise the image will not cover the whole screen.
A shorthand is:
.post {
RGBA colors are just RGB color values with an alpha value. background-color: #11cc11;
The alpha value sets the opacity of the color. opacity: 0.8;
}
rgba(255, 0, 0, 0.2); In the example above you are not targeting just the background color
rgba(255, 0, 0, 0.4); but a post which also contains text. (That is what a post is after all) This
rgba(255, 0, 0, 0.6); method will target all the elements that make up the post class and
change their opacity. Compared to the rgba example on the left which
rgba(255, 0, 0, 0.8);
only targets the color itself.
rgba(255, 0, 0, 1);
Box shadow
box-shadow: horizontal vertical blur color;
Text Shadows
You can add shadows to elements with css. You can add a text shadow to
any piece of text or use a box shadow to apply a shadow to the actual
element.
The text shadow has a horizontal shadow and a vertical shadow, you
then specify the colour you want the shadow to be:
h2 {
text-shadow: 2px 2px green;
}
You can also add a blur to the text shadow, It will be the third value,
here a 5px blur is added.
h2 {
text-shadow: 2px 2px 5px green;
}
Box Shadows
The box shadow has a horizontal value and a vertical value for the box
shadow, You also specify the color of the shadow.
div {
width: 300px;
height: 300px;
background-color: lightblue;
box-shadow: 10px 10px slategrey;
}
You can also add a blur to the shadow, This will be the third value. Here
I will add a 10px blur.
div {
width: 300px;
height: 300px;
background-color: lightblue;
box-shadow: 10px 10px 10px slategrey;
}
Inset box shadow
Just add the keyword inset and the shadow gets applied inside the
element.
<button>Normal Button</button>
<button class="button">Button</button>
.button {
background-color: lightblue;
border: none;
color: white;
padding: 1.3em 4em;
display: inline-block;
text-decoration: none;
font-size: 1em;
outline: none;
box-shadow: 0px 1px 5px #333;
}
.button:active {
box-shadow: inset 0px 3px 5px #333;
}
When you click on the button the active pseudo class is triggered and
the inset box shadow gets applied.
Making a Form
This form won’t actually submit anywhere but it is a nice example to
practice your html and css skills.
Index page:
<div class="form-div">
<form>
<h2>Sign Up For Free</h2>
<input type="text" name="name" placeholder="Name">
<input type="email" name="email" placeholder="Email">
<input type="submit" value="Sign Up">
</form>
<div>
CSS page:
.form-div {
text-align: center;
}
form {
background-color: #eee;
padding: 1em;
display: inline-block;
}
input {
display: block;
margin-top: 0.5em;
}
Index page: CSS page:
<div class="form-div"> .form-div {
<form> text-align: center;
<h2>Sign Up For Free</h2> }
<div>
form {
<input type="text" name="name" placeholder="Name">
background-color: #eee;
</div>
padding: 1em;
<div>
display: inline-block;
<input type="email" name="email" placeholder="Email"
min-width: 80%;
>
}
</div>
<div> input {
<input class="btn" type="submit" value="Sign Up"> margin-top: 0.5em;
</div> outline: none;
</form> padding: 0.75em;
<div> border: none;
min-width: 80%
}
input.btn {
min-width: 0;
color: #fff;
background-color: #22de7a;
padding: 1em 2em;
margin-top: 1.5em;
font-weight: bold;
}
The result so far
Index page:
<div class="form-div">
<form>
<h2>Sign Up For Free</h2>
<div>
<input class="data-entry" type="text" name="name" placeholder="
Name">
</div>
<div>
<input class="data-entry" type="email" name="email"
placeholder="Email">
</div>
<div>
<input class="btn" type="submit" value="Sign Up">
</div>
</form>
<div>
CSS page: .data-entry:focus {
body {font-family: sans-serif; background-color: background-color: #22de7a;
lightblue;} color: #fff;
}
.form-div {
text-align: center; input.btn {
} min-width: 0;
color: #fff;
form { background-color: #22de7a;
background-color: #eee; padding: 1em 2em;
padding: 1em; margin-top: 1.5em;
display: inline-block; font-weight: bold;
min-width: 80%; }
box-shadow: 2px 4px 15px #555;
} input.btn:active {
box-shadow: inset 1px 1px 5px #333;
h2 { }
color: #22de7a;
} input.btn:hover {
background-color: #22fe7a;
input { }
margin-top: 0.5em;
outline: none;
padding: 0.75em;
border: none;
min-width: 80%
}
The Result
http://LearnBuildCode.com
Learn to build websites with
my free tutorials
Thanks again
Harry
Good luck on your Website
building journey!