Tags for Styling

Learn to use the <div> and <span> tags to bring some styling to our application.

Use <div> and <span> for styling

Once our UI is laid out with semantic tags, providing a holder for each element, the next step is to actually style those views. In a subsequent chapter, we’ll talk about CSS, but to make the point about <div> and <span>, let’s create a design problem we can’t solve by styling the existing semantic tags. Our widget show page is just a semantic markup right now. Suppose our designer wants the rating section to look like the mockup below:

Get hands-on with 1200+ tech skills courses.