How to combine HTML with CSS

Actually there are three different ways to combine HTML file with CSS files. 
Here are three ways to combine HTML with CSS file:

1.Inline Style

Inline Style is a way of writing CSS file directly into the HTML tag, the following is an example of writing Inline Style:





Merging HTML and CSS Files



Example for Inline Style








How to combine HTML with CSS


2.Embedded Style

Embedded Style is a way of writing CSS into an HTML file per page (Page) and writing a CSS file before …. . 
Here is an example of writing:




Merging HTML and CSS Files




Example for an Embedded Style








How to combine HTML with CSS


3.Link Style

For writing Link Style is writing separately between the HTML file and a CSS file and we just put a link only, and installation can put your link in the … . 

For how Link Style is widely used by Web Design or programmer because of the way the Link Style is just one time writing CSS file that will be used by the entire Web page. 

Usually, Web Design Link Style CSS file name with name style.css. 
Here's an example file:

h2{
color: #FFCC00;
background: #CC0000;
}


Save stye.css file in the same directory with the html file that we will create and create a folder in the folder css css file input so impressed neat.




Create an HTML file with the following listing:



Merging HTML and CSS files




Example for Link Style





How to combine HTML with CSS

Note:

  • To insert a link to a file style.css placement should be between …. .
  • You could make more than one css file as needed.





Next, you can learn  Property In CSS.

Spread the love

Fajar (Ucup)

The owner and author of FajarYusuf.com and also someone who likes to share interesting information with others.

Leave a Reply

Your email address will not be published. Required fields are marked *