Giter Site home page Giter Site logo

htmlcheatsheet's Introduction

HTML Cheatsheet

Basic structure

<!DOCTYPE HTML>
<html>
  <head>
    <title></title>
  </head>
  <body>
  </body>
</html>

Basic tags

<html>
<head>
<body>

Didalam tag

<title>
<style>
<script>

Heading text

<h1> Ukuran 1</h1>
<h2> Ukuran 2</h2>
<h3> Ukuran 3</h3>
<h4> Ukuran 4</h4>
<h5> Ukuran 5</h5>
<h6> Ukuran 6</h6>

Container & Section

<div> //blockline
<span> //inline ( satu baris )
<hr>
<br>

Paragraph

<p>Lorem ipsum dolor....</p>

Karakter

&nbsp; digunakan untuk spasi

&quot; digunakan untuk double quote (")

&lt; digunakan untuk simbol (<)

&gt; digunakam untuk simbol (>)

&copy; digunakan untuk simbol copyright

&trade; digunakan untuk simbol trademark

Formatting

<b>Ini teks tebal</b>
<strong>Ini teks tebal</strong>
<i>Ini teks miring</i>
<em>Ini teks miring</em>
<u>Ini teks bergaris bawah</u>
<mark>Ini teks diblock warna kuning</mark>
<small>ini teks berukuran kecil</small>
<del>Ini teks digaris tengah</del>
<blockquote>Ini sebuah kutipan quote</blockquote>

Link

<a></a>

Images

<img>

List

<ul></ul>
<ol></ol>
<li></li>
<dt></dt>
<dd></dd>

Forms

<label>
<input>
<fieldset>
<button>
<select>
<optgroup>
<output>

Tables

<table>
<td>
<tr>
<th>
<caption>

Comment

<!--Ini adalah sebuah komen—->

HTML Atribut

img

  • src
<img src="image.jpg"> 
<img src="http://site.com/gambar.jpg">
  • width atau height
<img src="image.jpg" width="400" height="600">
  • alt
<img src="https://site.com/gambar.jpg" alt="Harimau">

link

  • href
<a href="https://www.google.com">Google</a>
<a href="/konten.php">Konten</a>
  • title
  • target
  • ref

style

<p style="color: red">Teks berwarna merah</p>

lang / bahasa

<html lang="en">

action

<form action="/halo.php">....</form>

id / class

<p id="contohid"> Dipanggil di CSS dengan tanda #<p>
<p class="contohclass"> Dipanggil di CSS dengan tanda .</p>

meta

  • charset
<meta charset="UTF-8">
  • http-equiv
<meta http-equiv="refresh" content="30">
<meta http-equiv="Content-type" .....>

Tag baru di HTML5

Section

Mendeskripsikan konten dengan tepat

  • <section>
  • <nav>
  • <header>
  • <article>
  • <aside>
  • <footer>

Audio dan video pada HTML5

  • <audio>
  • <video>

Tag baru di section tag

  • <mark>
  • <time>
  • <data>
  • <main>
  • <output>
  • <figure>
  • <figcaption>
  • <meter>

Efek 2D/3D

<canvas> dapat dipadukan dengan javascript

Elemen / Atribut Baru di HTML5

hanya digunakan di tag label berupa input, antara lain :

  • date
  • datetime-local
  • email
  • month
  • search
  • tel (gunakan dengan pattern number,contoh : pattern=[0-9]{12}. Berarti hanya diperbolehkan angka 0-9 dengan 12 digit)
  • time
  • url (gunakan http:// atau https://)
  • week

Atribut lainnya

https://www.w3schools.com/tags/ref_attributes.asp

https://devhints.io/html-input

Dokumentasi HTML by Mozilla

https://developer.mozilla.org/en-US/docs/Web/HTML/

Thanks for reading! You have question? Contact me :)

htmlcheatsheet's People

Contributors

sultanzio avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.