Open In App

HTML and CSS

Last Updated : 24 Nov, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

This article will show you how you can learn HTML and CSS to build a website or web pages. In this section, you will get complete overview to srart learning HTML and CSS.

What is HTML?

HTML stands for HyperText Markup Language. It is used to design web pages using a markup language. HTML is the combination of Hypertext and Markup language. Hypertext defines the link between the web pages. A markup language is used to define the text document within tag which defines the structure of web pages.

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 GeeksforGeeks</h1>
  
    <p>A computer science portal for geeks</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

Recent Articles on HTML

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 GeeksforGeeks</h1>
   
    <p>A computer science portal for geeks</p>
</body>
   
</html>


Output:

Why CSS is used?

Styling is an essential property for any website. It increases the standards and overall look of the website that makes it easier for the user to interact with it. A website can be made without CSS, as styling is MUST since no user would want to interact with a dull and shabby website. So for knowing Web Development, learning CSS is mandatory.

Complete Reference

CSS Interview Questions and Answers

CSS Quiz Set

Recent Articles on CSS

Some Important Articles on HTML and CSS



Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads