How The Web Works?

How the web works provides a simplified view of what happens when you view a webpage in a web browser on your computer or phone. This theory is not essential to writing web code in the short term, but before long you'll really start to benefit from understanding what's happening in the background.

This is how it's actually work:
1. The browser goes to the DNS server and searching for the real adresses for the website
2. The browser send an HTTP Request to the server asking it if it can send a copy of the websites or not. This process send across internet connections using TCP/IP.
3. Then the server responses to the client-side, if severs's accepted, it will send the packets to the browser.
4. The browsers assembles the data and show it to us.

Front-end

What is it?

Front-end web development, also known as client-side development is the practice of producing HTML, CSS and JavaScript for a website or Web Application so that a user can see and interact with them directly. The challenge associated with front end development is that the tools and techniques used to create the front end of a website change constantly and so the developer needs to constantly be aware of how the field is developing.

technology that front-end used

JavaScript logo
html logo
css logo

Common HTML TAG

HTML, HEAD, BODY

The <html> element, the root of an HTML document, should be added after the !DOCTYPE declaration. All content/structure for an HTML document should be contained between the opening and closing <html> tags.

Html <head> is a container for metadata of the webpage. HTML metadata is data about the HTML document. Metadata is not displayed. Metadata typically define the document title, character set, styles, scripts, and other meta information.

The <body> tag defines the document's body. The <body> element contains all the contents of an HTML document, such as headings, paragraphs, images, hyperlinks, tables, lists, etc. There can only be one <body> element in an HTML document.

                    
    <!DOCTYPE html>

    <html>

    <head>
        <meta charset="UTF-8">                          <!-- character set -->
        <title>CheetSheet Project</title>               <!-- webpage title -->
        <link href="styles.css" rel="stylesheet">       <!-- relationship between the current document and an external resource. -->
    </head>

    <body>
        <header>
            <nav>
            </nav>
        </header>
        <main>
            <section>
                <article>
                </article>
            </section>
            <section>
                <article>
                </article>
            </section>
        </main>
        <footer>
        </footer>
    </body>

    </html>
                    
                

NAVIGATION BAR

Having easy-to-use navigation is important for any web site. With CSS you can transform boring HTML menus into good-looking navigation bars. A navigation bar needs standard HTML as a base. In our examples we will build the navigation bar from a standard HTML list. A navigation bar is basically a list of links, so using the <ul> and <li> elements makes perfect sense:

How to create it:

                    
HTML CODE

<nav class="navbar">
    <ul>
        <li><a href="#Homes">Home</a></li>
        <li><a href="#News">News</a></li>
        <li><a href="#Contact">Contact</a></li>
        <li style="float:right"><a href="#Abouts">About</a></li>
    </ul>
</nav>
                    
                
                    
CSS CODE 

ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #333;
}
li {
    float:left;

}
.navbar {
    padding-top: 0px;
    position: relative;
    margin: 0 auto 0;
    overflow: hidden;
    text-transform: uppercase;
    
}

li a {
    height: 30px;
    
    display:block;
    color:white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 18px;
    font-family: Georgia;
}
li a:hover {
    background-color:#084042;
}
li a:active{
    background-color: rgb(0, 116, 77);
}
                    
                

TABLE

HTML tables allow web developers to arrange data into rows and columns.

First Name Last Name Age Occupation Location
Gabriel Allba 18 Student Norway
Cristiano Ronaldo 30 Football Player Portugal
Lionel Messi 30 Football Player Argentina
Jonathan Supratman 30 Officer Thailand
Engkok Supradi 35 Content Writer Indonesia

How to create it?

                    
<table id="table">
    <tr>
        <th>First Name</th>
        <th>Last Name</th>
        <th>Age</th>
        <th>Occupation</th>
        <th>Location</th>
    </tr>
    <tr>
        <th>Jonathan</th>
        <th>Supradi</th>
        <th>45</th>
        <th>Content Writer</th>
        <th>Indonesia</th>
    </tr>
    <tr>
        <th>Chrismanto</th>
        <th>Rondo</th>
        <th>45</th>
        <th>Programmer</th>
        <th>Hawaii</th>
    </tr>
</table>
                    
                
                    
table {
    width: 100%;
}
th {
    text-transform: uppercase;
    font-weight: bold;
}
table,th,td {
    border: 1px solid rgb(223, 223, 235);
    border-collapse: collapse;
    text-align: center;
    color: white;
}
th,td {
    padding: 20px;
}
td {
    color: black;
}
#table th {
    background-color: #008585;

}

#table tr:nth-child(even){
    background-color: whitesmoke;

}

#table tr:nth-child(odd){
    background-color: rgb(196, 196, 196);
                        
                        }