Website Development Prices

Search Blog

Sunday, February 28, 2016

Kako da obojite pozadinu naslova (How to add a background color to a heading)

Pitanje: kako da obojite pozadinu naslova?

Resenje: svojstvo background-color.

Primer:

HTML kod

<!DOCTYPE html>
<html>
<head>
<title>Kako da obojite pozadinu naslova</title>

<meta charset="UTF-8"/>
<meta name="description" content="Description that search reads" />
<meta name="keywords" content="page keywords, keywords" />
<meta name="author" content="Marija Rikic">
<link rel="icon" type="image/png" href="images/favicon.jpg">
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>


<body>
<h1>Ucim CSS</h1>

</body>


</html>

CSS kod

h1 {
background-color: #A1D490;
  color: #306B1D;
  font-family: Georgia, Arial, Helvetica, sans-serif;
  font-size: 26px;
  padding: 20px;

}

Rezultat:



Question: how to add a background color to a heading?

Solution: use property background-color.

Example:

HTML code

<!DOCTYPE html>
<html>
<head>
<title>How to a background color to a heading</title>

<meta charset="UTF-8"/>
<meta name="description" content="Description that search reads" />
<meta name="keywords" content="page keywords, keywords" />
<meta name="author" content="Marija Rikic">
<link rel="icon" type="image/png" href="images/favicon.jpg">
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>

<body>
<h1>Learning CSS</h1>
</body>

</html>

CSS code

h1 {
background-color: #A1D490;
  color: #306B1D;
  font-family: Georgia, Arial, Helvetica, sans-serif;
  font-size: 26px;
  padding: 20px;
}

Result:



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.