15. Span Elements

				
					
<p>HTML Tutorial: This is a filler sentence </p>
				
			

Video Summary

Alright guys, go over and basically the span tag is what we use to highlight elements or sections of text with our CSS stylesheet. So basically what we want to do is if you look down here if we have a paragraph, normal paragraph would say HTML tutorial. So what we want to do is with this span tag is we’re just isolating the HTML the tutorial. So let’s hop over to code and see how this works. So as you can see, right now, the span hasn’t transformed this, this section at all right? It’s basically the same thing as that would be and I will show it to you. What we can do is we’ll come down here we’ll take this span tag out, and they’re basically the same space or the exact same, please have that same exact sentence. But with the CSS code, we can target a lot with with targeting this fan right here, we can make the font size larger. So we made that 30 pixels, we change the color of the font to blue, and we put a padding to the right so this is where we wanted to manipulate a little section of this website, or of this element where we want to make this larger, especially when you’re trying to do like more. 

Like earlier videos I showed you that I made this strong. Alright, so now I have this as a larger, more bold tax, but really we you know, we don’t necessarily want to have the text being bold, because we can take the same strong tag, put this within the span and we will take the ending tag and we will this right here so now we have this a world that for the whole maybe that’s not exactly what we wanted. We didn’t really want to go we just wanted to find out not changed anything until you want so just by having to stand here wouldn’t wouldn’t do anything and all the lifting target this to the CSS or we can transform this into different colors, different sizes. We can even use different fonts. We can really just style a lot of stuff just by targeting that difference. So what happens is a lot of developers use this and we can target this and be able to manage we don’t want that. There wasn’t one that was right. And now we can come back here and see how it looks. 

So as the power of using span. It’s not something that we’re going to use every day, but it is something that is very beneficial to know when you start transforming different websites. I’m gonna go to the next element which is how we can structure, multiple elements in one section.

PHP Code Snippets Powered By : XYZScripts.com