Skip to main content

Mini Calendar using HTML/CSS and JS

 #html code==>>

<!DOCTYPE html>

<html lang="en">

<head>

    <link href='E:\html\testpro\style.css' rel='stylesheet'>

    <meta charset="UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>mini_calendar</title>

</head>

<body>

    <div class="calendar">

        <p id='monthname'></p>

        <p id='dayname'></p>

        <p id='daynumber'></p>

        <p id='year'></p>

    </div>

    <script src='E:\html\testpro\script.js' rel='text/js'></script>

</body>

</html>


#css  code==>>

*{

    box-sizing: border-box;

    margin: 0;

    padding: 0;

}


body{

    display: flex;

    background-color: #000;

    line-height: 80px;

}

.calendar{

    position: absolute;

    width: 200px;

    text-align: center;

    overflow: hidden;

    left: 20%;

    top: 20%;

    background-color: #fff;

    border-radius: 10px;

}


#monthname{

    font-family: fantasy;

    background-color: salmon;

    font-size: 4em;

    color: #fff;

    padding: 15px;

    border-bottom: 20px solid #777;

}


#dayname{

    font-size: 20px;

    color: #777;

}


#daynumber{

    font-size: 4.4em;

    font-family: fantasy;

}


#year{

    font-size: 1.4em;

    font-family: sans-serif;

}


#js code==>>

var date = new Date();


let monthname = date.toLocaleString('default', {month: 'long'});

let dayname = date.toLocaleString('default', {weekday: 'long'});

let daynumber = date.getDate();

let year = date.getFullYear();


document.getElementById('monthname').innerHTML = monthname;

document.getElementById('dayname').innerHTML = dayname;

document.getElementById('daynumber').innerHTML = daynumber;

document.getElementById('year').innerHTML = year;



For Digital Clock: click here

Comments

Popular posts from this blog

Machine Learning model for predicting 'Salary' of an Employee based on 'YearsofExperience'

“ Data really powers everything that we do .” — Jeff Weiner In the 21st century, Data is one of the most valuable entity anyone can have! There is loads-and-loads of data generated everyday. And to process this huge amount of data we need people who have expertise in it, who by the way are called as Data Engineers. Data Engineer collects the raw data, process it for further use; but we need an Analytic process which will automatically predict the data based on the previous one. And here's how 'Machine Learning' comes into the picture. "Machine Learning allows us to make highly accurate predictions based on the Historical Dataset which is used to train the machine learning model." Today let us look at a similar ML model to predict the 'Salary' of Employees based on 'YearsofExperience'. (P.S: I've provided pdf link at the very bottom of this page for clear understanding) 1) import the required modules 2) read the csv file 3) plot the graph 4) us...

Introduction to SQL

 Q.)  What is SQL ? Ans.) SQL(Structured Query Language) is a standardized language to communicate with the database.  With the help of it we can retrieve data from the database. SQL not only allows us to read the data but also allows us to write the data in the database.  Data in the database is stored in the form of tables. We can Select, Insert, Update, Delete, Create, Alter, Drop and can perform many more operations on the table. And these are called as SQL Statements. * SQL Statements are classified mainly into 4 categories :- 1) DML (Data Manipulation Language) 2) DDL (Data Definition Language) 3) DCL (Data Control Language) 4) TCL (Transaction Control Language) * Under DML we have :-(No Autocommit) 1. Select  2. Insert  3. Update  4. Delete  5. Merge    * Under DDL :-(Allows Autocommit) 1. Create 2. Alter  3. Drop  4. Truncate  5. Flashback * Under DCL :-(Allows Autocommit) 1. Grant  2. Revoke  * Under T...

Stock Market using Python

 "The stock market is a device for transferring money from the impatient to the patient." - Warren Buffett Today we'll look into few ways for accessing the stock market. And we'll do this using Python ! Now, as we know that there are 2 stock exchange in India; BSE and NSE So we'll get the data from both! To begin with let's access the data from BSE first. (P.S: I certainly like the 2nd and the 3rd method to access stock market!) * So, to import the BSE data we need to " pip install bsedata ". => And then import the module, => Create an object to store the Driver Class => Then we need to do " getQuote('script_code')" where we need to provide a script code of a company which we need to access. Just like here we have given; => And from here we can see that the script code was for the company named "V-MART". But we can't remember all the script code hence we need to download this script file from the BSE websi...