How to learn Html style

CSS can be applied for 3 inside Html. These include Inline Style which is input inside the Html, such as: <h1 style = “color: red;”> Hello Word </h1>. If you style CSS for this, there will be no problem but there may be problems in the future. Suppose you have a website like Facebook. If you use Inline Style there, if you want to change the site CSS in the future, you will need to see the code one by one. It will then become a huge problem. So you can use Embedded Style to get rid of this problem.

It is not placed in the middle of the header and body. Its power is a little less than the inline style. Suppose you write h1 {color: red; } Later he wrote h1 {color: green; } Said which of these two CSS will work more. You say that the colour of the CSS that you have in the first place will get it. If your answer is that, then you are wrong. There are some problems in this place.

If the CSS code is too much, then the Html code will not be seen and the page will be lost. For this, you should use the External Style Sheet. Any kind of problem that goes into it is creating another page for it which is then added to the index. It is a link tag and is added inside. Currently, it is used more. If you want, you can see it on our site. We have also used the External Style Sheet. If you want, you can see on Facebook that the External Style Sheet has been used more in the store. Below are these 3 shot codes.

There are three ways to apply CSS to HTML:

  1. inline.
  2. internal.
  3. external.

1. Inline Style:

The style attribute is used inside the HTML start tag.

<!DOCTYPE html> 
      <h1 style="color:blue;text-align:center;">This is a heading </h1>
      <p style="color:red;">This is a paragraph.</p>


2.internal Style:

In this method, the style element is used inside the <head> element of the document.

p { 
    font-family: georgia, serif;
    font-size: x-small; 
hr { 
    color: #ff9900;
    height: 1px; 
a:hover {
    color: #ff0000;
    text-decoration: none;


3. External Style Sheet:

In this method, the <link> element is used to point to an external CSS file.

      <link rel="stylesheet" type="text/css" href="mystyle.css">

Related Posts

Hr tag in HTML example.jpg

Hr tag in HTML example

What is an hr tag in HTML, and Why is it Useful? The hr tag is an HTML tag example that stands for the horizontal rule. It…

Author in HTML.jpg

Author in HTML

Introduction Author in HTML An HTML author bio is a short paragraph that describes who you are and what you do. It usually appears in an HTML…

Sub and sup Tag in HTML.jpg

Sub and sup Tag in HTML

What is a Sub or Sup Html Tag? An HTML sub or sup tag is used to change the text’s vertical position. The sub and sup tags…

Form in html

How to Learn Form in html

I will discuss Form in Html and why this tag works. In short, the HTML <form> tag is used to create a form for user input If…

Comment in Html

How to learn HTML Comment in HTML

Comment in HTML The purpose of commenting in HTML is to let your co-worker know that I am designing a web page for a company today as…

How to learn html colors

The most important thing about a website is HTML colors. A website will look beautiful when its colour is beautiful. There are many types of colours we…

This Post Has 6 Comments

Leave a Reply

Your email address will not be published.

Education Template