HTML & CSS

  • Last Updated : 02 Sep, 2021


HTML Tutorials

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.

HTML is a markup language that is used by the browser to manipulate text, images, and other content to display it in the required format.

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:

Recent Articles on HTML !







CSS Tutorials

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:

Recent Articles on CSS !


Some Important Articles on HTML and CSS:

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

My Personal Notes arrow_drop_up


Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the link here.