-1

I am trying to create a widget/tile object to display on my page. Basically its a rectangular box with a background color which I would like to display some text in.

To be specific I want to create widgets like the ones in dashing (dashing.io).

I am kinda new to JS/HTML.

sam
  • 1,280
  • 2
  • 11
  • 20

1 Answers1

1

HTML:

<div class=widget>
<h2>Some text</h2>
</div>

CSS: You can change the values

.widget {
width: 100px;
height: 100px;
background-color: red;
}
h2 {
 margin: auto;
}
AngularLover
  • 364
  • 1
  • 12