HTML and CSS

This article aims to provide you with a thorough understanding of how to use HTML and CSS to construct websites or web pages. Here, we present a complete overview to kickstart your journey in learning HTML and CSS.

What is HTML?

HTML, an acronym for HyperText Markup Language, is the standard language for designing web pages. It is a combination of Hypertext, which establishes the links between web pages, and Markup language, which is used to define the structure of web pages within tags. HTML forms the backbone of any webpage, dictating its structure and content.

Example: Let’s see a small example of a simple HTML page that displays the heading and paragraph content.

HTML
<!DOCTYPE html>
<html>

<head>
    <title>Simple HTML Page</title>
</head>

<body>
    <h1>Welcome to w3wiki</h1>

    <p>A computer science portal for Beginner</p>
</body>

</html>

Output:

Why HTML is used?

  • It is a simple markup language and its implementation is easy.
  • It is used to create a website structure.
  • It helps in developing fundamentals about web programming.

Complete Reference:

HTML Interview Questions

HTML Quiz Set

What is CSS?

CSS (Cascading Style Sheets) is a stylesheet language used to design the webpage to make it attractive. The reason for using CSS is to simplify the process of making web pages presentable. CSS allows you to apply styles to web pages. More importantly, CSS enables you to do this independent of the HTML that makes up each web page.

There are three types of CSS which are given below:

  • Inline CSS: In Inline CSS, we add the style to the tags using the “style” attribute inside the tag which we want to design.
  • Internal or Embedded CSS: Internal CSS allows us to style our page by adding the <style> tag inside the <head> tag. Inside the <style> tag, we add the design that we want to give to our page.
  • External CSS: External CSS lets us add style to our HTML page externally. We can add our styles in a different file with extension .css and link this page to our HTML page.

Example:

HTML
<!DOCTYPE html>
<html>
 
<head>
    
    <!-- Stylesheet of web page -->
    <style>
        body {
            text-align: center;
        }
 
        h1 {
            color: green;
        }
    </style>
</head>
 
<body>
    <h1>Welcome to w3wiki</h1>
 
    <p>A computer science portal for Beginner</p>
</body>
 
</html>

Output:

Why CSS is used?

CSS is indispensable in modern web development. It elevates the aesthetic appeal and usability of a website, enhancing user interaction. While it is technically possible to create a website without CSS, the lack of styling would result in a dull and unattractive site. Therefore, mastering CSS is a must for anyone interested in web development.

Complete Reference

CSS Quiz Set

Some Important Articles on HTML and CSS

Contact Us