Thursday, 10 December 2015

Kak bagaimana sih cara mena

Cara yang gua tau sih harus ditampung dulu ke suatu variabel, baru kemudian di terapkan ke suatu paragraph.

Kayak gini:
var text="";

for (i=0; i <= hh ; i ++)
{
text = text + "<p>Hello</p>" ;
alert(text);
}
document.getElementById("myparagraph").innerHTML = text;

Wednesday, 9 December 2015

1. Change a text to strong
Answer: <strong>Text goes here </strong>

2. Put basic 3 lines into blank html
Answer:
<!DOCTYPE html>
<head>
This my text like.
</head>

3. Between the <head> tags, add in an opening <title> tag and closing </title> tag and Between the <title> tags, write in a title for your page. For example, "My Webpage."
Answer:

<!DOCTYPE html>
<head>
<title>This my title</title>
</head>

4. Underneath the closing </head> tag, put an opening <body> tag and a closing </body> tag, like in the example above.
Answer:
<!DOCTYPE html>
<head>
<title>This my title</title>
</head>
<body>
</body>

5. Inside the body, create two paragraphs. Each paragraph starts with an opening <p> tag and ends with a closing </p> tag. We can write content in between the tags.
Answer:
<!DOCTYPE html>
<head>
<title>This my title</title>
</head>
<body>
<p>Hello World!</p>
</body>

6. In the body section, create a heading. To do this, create an <h1> tag. Close the element with a closing tag </h1>. (Your content should now be between <h1> and </h1>.)
Answer:


7. Underneath the heading tags, create two paragraphs using <p> tags with whatever content you like.

HTML & CSS: Hey whats the difference between width using % and using pixel?

Hey whats the difference between width using % and using pixel?
Answer:

HTML & CSS: There are 2 types making link/Navigation

1. Using list
<ul>
<li><a href="http://www.facebook.com">News</a></li>
<li><a href="http://www.google.com">Sport</a></li>
</ul>


2. or not using list a.k.a directly
<a href="http://www.facebook.com">News</a>
<a href="http://www.google.com">Sport</a>

This one can be easily modified.

Three things you need to do with link

1. Text-decoration
2. When visited
3. When not-visited
4. When expired
5.

Great Personality

Great personality is not like Samson. Samson is defeated by Delilah.

Tuesday, 8 December 2015

Algorithm to web design

1. Adding Divs

Switchable steps:
2. Adding border
div {
border: 1px solid hotpink;
}
3. Adding background color
4. Adding paragraph example
5. Adding width
6. Adding height
7. Adding float
8. Adding clear
9. Adding position
10. Adding margin to div except div footer

/* Remember that you already have 4 div: header div, left, right and footer. */
/* CSS code begin here */
/* Hey, please global first */
div {
border-radius: 1px;
background-color: hotpink;
}
/* <selector> { <style-style-style> } */
/* id is kress(#). Class is dot(.) */
#header {
border: 1px solid green;
height:10%;
position: relative;
}
.left {
border: 1px solid blue;
position: relative;
width: 10%;
height: 80%;
float:left;
margin-top:10px;
margin-bottom:10px;
}
.right {
border: 1px solid yellow;
position:relative;
width:89%;
height:80%;
float:right;
margin-top:10px;
margin-bottom:10px;
}
#footer {
border: 1px solid red;
position:relative;
width:100%;
height:10%;
clear:both;
}

<head>
<link type="text/css" href="mystylesheet.css" rel="stylesheet" />
</head>
<body>
<!--- We can use 2 types of naming upon a tag (for i.e. "div"): using 'id' and using 'class'--->
<div id="header"><p>This is header</p></div>
<div class="left"><p>This is left</p></div>
<div class="right">This is right</div>
<div id="footer">This is footer</div>
</body>

11. Adding content to each div. I mean replace the point (4) result.

Dealing with link
12. Adding list using external javascript
Method/Type 1:
document.getElementById("links").innerHTML = "<ul id='menu'>" +
"<li><a href='http://www.google.com'>News</a></li>"+
"<li><a href='http://www.yahoo.com'>Sports</a></li>"+
"</ul>";


Type 2:


13.
14. Manipulate the link styles point (12)
- text-decoration
- when not visited
- when visited
- when hover
14.