how to create button in html and css

how to create button in html and css

hello everyone, today we will learn about how to create button using css and html.



first open the text editor, in this tutorial, I use sublime text

 

Next, make html file and css file, in this tutorial my file name is index.html and style.css

to create a button in html, we type:

<button>CLICK HERE<button>

to give style, we create css by opening a new file with the name style.css then type style

 

.button{
    padding: 10px;
    border: 1px solid blue;
    background-color: cyan;
    color: black;
    font-weight: bold;
    border-radius: 10px;
}

 

next, link css file to html, type:

    <link rel="stylesheet" type="text/css" href="style.css">

 

You can copy this text:

index.html


<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>how to create button in html and css</title>
    <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<button class="buttoncustom">CLICK HERE</button>
</body>
</html>

 

text for style.css file

 .buttoncustom{
    padding: 10px;
    border: 1px solid blue;
    background-color: cyan;
    color: black;
    font-weight: bold;
    border-radius: 10px;
}
see you next time

0 Response to "how to create button in html and css"

Posting Komentar