DEV Community

Cover image for Day 2 in Web Development
Xalman khalid
Xalman khalid

Posted on

Day 2 in Web Development

Today i start learning about basic css and this is very cool from previews day.i learn about selectors(targeting as well),properties and values in One selector we can use multiple properties and values like background color's, colors, font-family,border and boarder radius.
css is very help full for making web page's look cool and attractive. Also i learn about semantic tags in html these tags are also like div tags these tags
tells google bots that the content within the tag is the most significant header contained in the HTML
header, nav, section, footer
etc..
with these tags i learn to make skeleton of a web page i use display-inline and inline-block with make
div tags in one row further i saw difference about margin and padding in div tags we have default margin and
padding, last thing which little but hard for me to understand about display:inline-block and dislpay:flex;
i will R & N in upcoming days

<Header>
    <nav>
      <ul>
        <li>Home</li>
        <li>Location</li>
        <li>Contact</li>
       </ul>
     </nav>
        <h1>Title</h1>
</Header>
     <section>
       <div>a</div>
       <div>b</div>
       <div>c</div>
     </section>   
        <section>triple-section</section>
        <footer>Footer</footer>
body {
    background: rgb(58 ,58,58);
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
}
header {
    background: black;
    padding: 20px;

}
section {
    background:  white;
    color: gray;
    padding: 20px;
    display: flex;
    flex-direction: row;
}
div {
    background: red;
    margin: auto;
    width: 100px;

}
ul {
    margin: 0;
    padding: 0;
    list-style: none;

}
li {
    display: inline-block;
    margin-right: 20px;
}
footer {
    background: black;
    padding: 10px 20px;
}

https://dev-to-uploads.s3.amazonaws.com/i/oahqgdoz7dqtg7wog8ft.PNG

Top comments (2)

Collapse
 
slavcoder profile image
Sławomir

Hey. Nice to see you enjoy learning. I have a tip for you about markdown files, you can turn on highlighting sytax in code blocks by writing what kind of syntax it is right after three backticks.

body {
    background: rgb(58 ,58,58);
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
}
Collapse
 
slkd7700 profile image
Xalman khalid

Sure in next blog i will do highlighting sytax