TUGAS 5 PEMROGRAMAN WEB

MEMBUAT WEB BERITA DENGAN HTML + CSS


Karina Soraya P
05111740000003
Pemrograman Web - C


  • Source Code HTML
 <html>    
  <head>    
   <title>TC News</title>    
   <link rel="stylesheet" href="css"/>    
   <link rel="icon" type="image/png" href="tes.png">  
  </head>    
  <body>    
   <div class="header">    
     <div class="jarak">    
     <h2>  
      <span style="color: #D32F2F">TC NEWS</span>  
     </h2>   
     </div>    
   </div>    
 <div class="topnav" style="width: 100%;">  
  <a class="active" href="#home">Beranda</a>  
  <a href="#Prestasi">Prestasi</a>  
  <a href="#cinta">Asmara</a>  
  <a href="#hot">Terhangat</a>  
  <a href="#contact">Kontak</a>  
  <a href="HTML.html">Registrasi</a>  
  <input type="text" placeholder="Search..">  
 </div>  
 <!-- Slideshow container -->  
 <div class="slideshow-container">  
  <!-- Full-width images with number and caption text -->  
  <div class="mySlides fade">  
   <img src="if.jpg" style="width:100%">  
  </div>  
  <div class="mySlides fade">  
   <img src="cie.jpg" style="width:100%">  
  </div>  
  <div class="mySlides fade">  
   <img src="mlam.png" style="width:100%">  
  </div>  
  <!-- Next and previous buttons -->  
  <a class="prev" onclick="plusSlides(-1)">&#10094;</a>  
  <a class="next" onclick="plusSlides(1)">&#10095;</a>  
 </div>  
 <br>  
 <!-- The dots/circles -->  
 <div style="text-align:center">  
  <span class="dot" onclick="currentSlide(1)"></span>   
  <span class="dot" onclick="currentSlide(2)"></span>   
  <span class="dot" onclick="currentSlide(3)"></span>   
 </div>  
 <script>  
 var slideIndex = 1;  
 showSlides(slideIndex);  
 // Next/previous controls  
 function plusSlides(n) {  
  showSlides(slideIndex += n);  
 }  
 // Thumbnail image controls  
 function currentSlide(n) {  
  showSlides(slideIndex = n);  
 }  
 function showSlides(n) {  
  var i;  
  var slides = document.getElementsByClassName("mySlides");  
  var dots = document.getElementsByClassName("dot");  
  if (n > slides.length) {slideIndex = 1}   
  if (n < 1) {slideIndex = slides.length}  
  for (i = 0; i < slides.length; i++) {  
    slides[i].style.display = "none";   
  }  
  for (i = 0; i < dots.length; i++) {  
    dots[i].className = dots[i].className.replace(" active", "");  
  }  
  slides[slideIndex-1].style.display = "block";   
  dots[slideIndex-1].className += " active";  
 }  
 </script>  
 <br>  
 <div class="date">  
  <div class="jarak">   
  <center><script type='text/javascript'>  
 var months = ['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember'];  
 var myDays = ['Minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jum&#39;at', 'Sabtu'];  
 var date = new Date();  
 var day = date.getDate();  
 var month = date.getMonth();  
 var thisDay = date.getDay(),  
   thisDay = myDays[thisDay];  
 var yy = date.getYear();  
 var year = (yy < 1000) ? yy + 1900 : yy;  
 document.write(thisDay + ', ' + day + ' ' + months[month] + ' ' + year);  
 </script></center>  
 </div>  
 </div>  
 <div class="content">    
  <div class="jarak">    
      <!-- kiri -->    
  <div class="kiri">    
      <!-- blog -->    
   <div class="border">    
    <div class="jarak">     
     <h5>22 April 2018</h5>  
      <img src="tccup.png" width="250px" height="250px">    
       <h2>TC CUP</h2>   
      <p>Merupakan perlombaan anak-anak TC. Baik sport, e-sport, dan sebagainya. Acaranya berjalan begitu seru dan menyatukan berbagai angkatan</p>  
      <button class="btn">Baca Selengkapnya</button>    
    </div>    
   </div>    
   <!-- end blog-->    
   <div class="border">    
   <div class="jarak">    
    <h5>20 Agustus 2018</h5>  
    <img src="tc.png" width="250px" height="250px">  
     <h2>OKKBK</h2>    
     <p>Acara OKKBK berlangsung selama 4hari. Acara ini merupakan bentuk ospek jurusan dimana para mahasiswa baru dikenalkan dengan jurusan dan profesi yang terkait dengan jurusan</p>    
      <button class="btn">Baca Selengkapnya</button>    
   </div>    
  </div>    
  </div>    
      <!-- kiri-->    
      <!-- kanan -->    
   <div class="kanan">    
    <div class="jarak">    
      <h3>TAHUN</h3>    
        <hr/>    
        <p><a href="#" class="undecor">2018</a></p>    
        <p><a href="#" class="undecor">2017</a></p>    
        <p><a href="#" class="undecor">2016</a></p>    
        <p><a href="#" class="undecor">2015</a></p>    
        <p><a href="#" class="undecor">2014</a></p>     
    </div>    
   </div>    
      <!-- kanan -->    
  </div>    
 </div>    
 <div class="foot">  
  <div class="jarak">    
   <center><p>Copyright Anak TC</p></center>    
  </div>   
 </div>  
 </body>    
 </html>    
  • Source Code CSS
 body{    
   background: white;    
   color: #333;    
   width: 100% ;    
   font-family: "Comic Sans MS", cursive, sans-serif;    
   margin: 0 auto;    
  }    
  .header{    
   width: 100%;    
   margin: auto;    
   height: 120px;    
   line-height: 120px;    
   background: white;    
   color: black;   
   font-family: "Comic Sans MS", cursive, sans-serif;   
   margin-top: 0;  
  }    
 * {box-sizing:border-box}  
 /* Slideshow container */  
 .slideshow-container {  
  max-width: 1000px;  
  position: relative;  
  margin: auto;  
 }  
 /* Hide the images by default */  
 .mySlides {  
   display: none;  
 }  
 /* Next & previous buttons */  
 .prev, .next {  
  cursor: pointer;  
  position: absolute;  
  top: 50%;  
  width: auto;  
  margin-top: -22px;  
  padding: 16px;  
  color: white;  
  font-weight: bold;  
  font-size: 18px;  
  transition: 0.6s ease;  
  border-radius: 0 3px 3px 0;  
 }  
 /* Position the "next button" to the right */  
 .next {  
  right: 0;  
  border-radius: 3px 0 0 3px;  
 }  
 /* On hover, add a black background color with a little bit see-through */  
 .prev:hover, .next:hover {  
  background-color: rgba(0,0,0,0.8);  
 }  
 /* The dots/bullets/indicators */  
 .dot {  
  cursor: pointer;  
  height: 15px;  
  width: 15px;  
  margin: 0 2px;  
  background-color: #bbb;  
  border-radius: 50%;  
  display: inline-block;  
  transition: background-color 0.6s ease;  
 }  
 .active, .dot:hover {  
  background-color: #717171;  
 }  
 /* Fading animation */  
 .fade {  
  -webkit-animation-name: fade;  
  -webkit-animation-duration: 1.5s;  
  animation-name: fade;  
  animation-duration: 1.5s;  
 }  
 @-webkit-keyframes fade {  
  from {opacity: .4}   
  to {opacity: 1}  
 }  
 @keyframes fade {  
  from {opacity: .4}   
  to {opacity: 1}  
 }  
  .topnav {  
   overflow: hidden;  
   background-color: grey;  
   width: 100%;  
 }  
 /* Style the links inside the navigation bar */  
 .topnav a {  
   float: left;  
   display: block;  
   color: black;  
   text-align: center;  
   padding: 14px 16px;  
   text-decoration: none;  
   font-size: 17px;  
 }  
 /* Change the color of links on hover */  
 .topnav a:hover {  
   background-color: grey;  
   color: black;  
 }  
 /* Style the "active" element to highlight the current page */  
 .topnav a.active {  
   background-color: #D32F2F;  
   color: white;  
 }  
 /* Style the search box inside the navigation bar */  
 .topnav input[type=text] {  
   float: right;  
   padding: 6px;  
   border: none;  
   margin-top: 8px;  
   margin-right: 16px;  
   font-size: 17px;  
 }  
 /* When the screen is less than 600px wide, stack the links and the search field vertically instead of horizontally */  
 @media screen and (max-width: 600px) {  
   .topnav a, .topnav input[type=text] {  
     float: none;  
     display: block;  
     text-align: left;  
     width: 100%;  
     margin: 0;  
     padding: 14px;  
   }  
   .topnav input[type=text] {  
     border: 1px solid #ccc;  
   }  
 }  
 .a {  
   position: relative;  
   text-align: center;  
   color: white;  
 }  
  .content{    
   width: 100%;    
   margin: auto;    
   height: 1050px;    
   padding: 0.1px;    
   background: white;    
   color: #333;    
  }    
  .kiri{    
   width: 70%;    
   float: left;    
   margin: auto;    
   background: white;    
   height: 420px;    
  }    
  .kanan{    
   width: 30%;    
   float: left;    
   margin: auto;    
   background: white;    
   height: 420px;    
  }    
  .border{    
   border: 2px solid #DCDCDC;    
   margin-top: 1pc;    
   padding-bottom: 1pc;    
   padding-left: 2pc;    
   padding-right: 2pc;    
  }    
  .undecor{    
   text-decoration: none;   
   color: black;   
  }    
  .date{    
   width: 100%;    
   margin: 0;     
   line-height: 40px;   
   margin-bottom: 0;   
   background: grey;    
   color: black;    
  }   
  .foot{  
   width: 100%;    
   margin: 0;     
   line-height: 30px;  
   background: grey;    
   color: black;    
  }   
  .jarak{    
   padding: 0 3pc;    
   margin: 0;  
  }    
  • Hasil









Komentar

Postingan Populer