24 Computer -- Web Technology I

Practice #2: Try to recreate the design shown in the image using HTML and CSS. (Not in syllabus, Only for practice)

Practice #2: Try to recreate the design shown in the image using HTML and CSS. (Not in syllabus, Only for practice)


Here is the html, css and js (u gotta flex u can use js when u can) codes for recreating ths website:-

For viewing codes in a clean and a programmer way, heres the link for githhub:

https://github.com/Samyak354/tht_calendar_thingy.github.io


Resources used (maybe useful for you in future projects):-

color picker chrome extension

google (that one time i had to search how to center a div)


Final Result (Close Enough Right??) :







This is gonna be a mess but here is the codes u can ctrl+c and ctrl + v (but pay attention to file names and where u save the files):


HTML

<html>
   <head>
      <title>Kyalendar ig</title>
      <link rel="stylesheet" href="bruhhh.css">
   </head>

   <body>
      <div class="tht_grey_thingy">
         <div class="tht_white_thingy">
            <center>
               <label id="titole">February 2019</label>
           
            <table>
               <tr id="dayz">
                  <td><span>S</span>U</td>
                  <td><span>M</span>O</td>
                  <td><span>T</span>U</td>
                  <td><span>W</span>E</td>
                  <td><span>T</span>H</td>
                  <td><span>F</span>R</td>
                  <td><span>S</span>A</td>
               </tr>
               <tr id="row-1">

               </tr>
               <tr id="row-2">

               </tr>
               <tr id="row-3">

               </tr>
               <tr id="row-4">
                 
               </tr>
            </table>
            </center>
         </div>
         
      <script src="sus.js"></script>
   </body>
   
</html>


CSS

#titole {
   color: #344e67;
   font—family: Arial, Helvetica, sans-serif;
   font-size: 35px;
   text-align: center;
   font-weight: 630;
}

#dayz {
   color: #8ba1b5;
   font—family: Arial, Helvetica, sans-serif;
   font-size: 20px;
}

span {
   color: #8ba1b5;
   font—family: Arial, Helvetica, sans-serif;
   font-size: 25px;
}

table {
   padding: 10px;
   border: 3px solid #bdccdb;
   border-radius: 10px;
   margin-top: 15px;
   background-color: white;
}

td {
   padding: 10px;
   text-align: center;
}

body {
   background-color: #d9e2eb;
}

JS

const row_1 = document.querySelector("#row-1")
const row_2 = document.querySelector("#row-2")
const row_3 = document.querySelector("#row-3")
const row_4 = document.querySelector("#row-4")

let a = 1
let b = 8
let c = 15
let d = 22


function render(stort) {
   let dates=""
   for(let i=stort; i<stort+7; i++) {

      dates += `
      <td>
         ${i}
      </td>`
     
   }
   
   if(stort==a) {
      row_1.innerHTML = dates
   }else if(stort==b) {
      row_2.innerHTML = dates
   }else if(stort==c) {
      row_3.innerHTML = dates
   }else if(stort==d) {
      row_4.innerHTML = dates
   }
}
 
function view() {
   render(a)
   render(b)
   render(c)
   render(d)
}

view()


More questions on Web Technology I

What is a link? Write the various ways of linking a document with another.

The link is a feature in HTML that allows the user to connect two webpages or documents.Alinkhas two ends -- calledanchors-- and a direction. The link starts at the "source" anchor and points to the "destination" anchor, which may be any Web resource (e.g., an image, a video clip, a sound bite, a program, an HTML document, an element within an HTML document, etc.).

HTML links are hyperlinks.

You can click on a link and jump to another document.

When you move the mouse over a link, the mouse...

Define table and write its tag.

he<table>tag defines an HTML table.

An HTML table consists of one<table>element and one or more<tr>,<th>, and<td>elements.

The <tr> element defines a table row, the <th> element defines a table header, and the <td> element defines a table cell.

An HTML table may also include<caption>,<colgroup>,<thead>,<tfoot>, and<tbody>elements.


Example

A simple HTML table, containing two columns and two rows:

<table>
<tr>
...
Close Open App