Create upload file button
create upload file button in html css which upload the file from internal pc
following are step are taken to create this app 1 open VS code editor 2 create file of index.html style.css 3 code in html file to construct basic skeleton of upload file button 4 code in style.css file to style the upload file button 5 finally we create upload file buttonWatch video for more details
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Upload file</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Sample Uplaod file in Html CSS <br>HTML CSS Tutorial for beginner</h1>
<p>Click on the "Upload File" button to upload a file:</p>
<form action="">
<input type="file" id="myFile" name="filename">
<button type="submit">Upload File</button>
</form>
</body>
</html>
style.css
h1 {
text-align: center;
font-family: sans-serif;
font-size: 20px;
font-weight: bold;
line-height: 40px;
}
p {
text-align: center;
font-family: sans-serif;
font-size: 15px;
font-weight: bold;
}
form {
border: 1px solid gray;
padding: 10px;
width: 350px;
margin-left: 470px;
}
button {
background-color: green;
color: white;
padding: 15px;
border-radius: 8px;
margin-top: 20px;
border: none;
}
button:hover {
background-color: blue;
color: white;
}
Comments
Post a Comment