Quantcast
Channel: Can anybody tell me what these two codes are doing?
Viewing all articles
Browse latest Browse all 17

Can anybody tell me what these two codes are doing?

$
0
0

@timagixe wrote:

JS:

function hello() {
alert(“Hello!”);
}

if you call hello() function you will see an alert message like:

CSS:

body {
background-color: #000000;
text-align: center;
}

this CSS code will set the background color to <body> ... </body> tag to be equal to #000000 (which is black) and the text inside it will be aligned to center.

Example:

button {
width: 200px;
height: 50px;
}

the last snippet set the height and width properties to the <button> ... </button> elements on the page.

Example:

Read full topic


Viewing all articles
Browse latest Browse all 17

Trending Articles