Decorating and indenting text
In the last lesson our focus was on the characters and how they look like in this lecture we move our attention one step higher as we explore decorating text. By the end of this lesson, you will know how to decorate/style/control/indent text in HTML using CSS.
Video Transcript
00:00We're taking a step out of the font itself and the definition of the font to one layer above it
00:06Which is the decoration of the elements but then this lecture you'll be familiar with most of the common decorations
00:12You could do two elements controlling them through CSS when it's not the actual font itself that is being manipulated
00:18but actually a
00:20Exterior rendering to it. So let's see it in action
00:24There's absolutely more to talk about when it comes to fonts such as embedding fonts and many other things
00:30That relate to CSS 3 so we're not going to cover them in this title
00:34Make sure to follow in our CSS 3 title because everything we're talking here is really web standard already and really workable
00:42Alright, so with that said let's jump right into our code and move on to the next topic and we're staying talking about fonts
00:48But taking one step away from the font level and moving to the text level now in the text level itself
00:55We're going to talk about three different
00:57Things that we could do a text in general and on the text level. This is beyond the font
01:02The font has already been rendered. I could go away and set a text decoration
01:07Now a text decoration is basically a line that would go above underneath or through a text and also we can make our text blink
01:16So for example, if I set it to be blink
01:17I save it if my browser supports that capability my text would then start blinking in this case
01:24My text does not support blinking and I won't see any blinking
01:29But if I go ahead and I set something a little bit more standard such as uppercase
01:34And really you don't really want to create stuff that are blinking in
01:38General. Oh, what am I doing? Not uppercase over line
01:43So we're going to create a line over our text and if we do that and click on refresh
01:47We'll see that now we have a line going right above our copy
01:52Or we could set it to be an underline
01:54All right, so blink in general. I wouldn't use it even though it's in the standard itself
01:59A blink would enable us to blink but it really just depends on if the browser actually supports and if they decided to leave
02:05Because blinking is quite annoying
02:07Some browsers decided just not to adhere to that standard. So i'm going to go ahead here and i'm just going to
02:13Add those um things that we could do with the text decoration. We've seen basically all of them besides the line through
02:21But it is quite intuitive now, obviously the default is none. So we don't have to talk about that as well
02:28And let's move on to the next text text decoration or text control that we could have to elements
02:34Now for the next one i'm going to go ahead and i'm going to go into one of our paragraphs
02:38Or even to any paragraph inside of our article and i'm going to go ahead and create a text indent
02:44Now the text indent contrary well not necessarily contrary the text indent accepts a value such as let's say 100 pixels
02:51And if I go ahead and set up an indent of 100 pixels notice what will happen
02:56My copy itself will be pushed by 100 pixels and start a little bit later in the copy
03:02so if in any scenario you'd want to create an indentation you could put there or
03:06Actual pixels or any numbering system of all the numbers that we talked about and that includes
03:12percentages as well, which would give it a 10 percent
03:16of
03:17spacing which is kind of correlates to the actual
03:2410 percent of the total of the the area of the box that it's contained within
03:30So in our case because our copy is kind of indented already originally that 10 percent is actually quite a lot
03:36So if I go ahead here and I just said here a much smaller value
03:39But in general I would go for a defined path 100 pixels a defined it could be even based on the
03:46Size of our font
03:46So if I wanted to push my content to be three
03:49Sizes of my font for my position then I could go ahead and set it in that way
03:54So I could literally decide it. I love using relative
03:57Positionings so the more relative stuff you use the better because then if you go on to mobile development or other platforms
04:04All you have to do is change only one thing which would be that initial font size that you created
04:09And then that could control most of your design if you decide to do it in that way
04:13Which is a very smart strategy in general when you're going to design your own site
04:19All right
04:19So let's talk about just one more item which is basically transforming our text itself
04:24If we want it all for example for our headline if we just take a peek here for our headline
04:29We've already seen it
04:30But how about it for this text here if we wanted everything to be lower cased or we wanted everything to be
04:36Capitalized because it's a title and maybe someone didn't put in in this headline
04:41Capitalization is the way we wanted them to do. So how about we go ahead and
04:45Span into the rules of anything that is a headline
04:48We're going to go ahead here and make sure that all headlines i'm just going to go ahead here and put here
04:53Uh, and I could see here that there's already a mistake here because there should have been a semicolon
04:57So i'm going to go ahead here and just put that semicolon
05:00And fix that mistake that was there and go ahead and continue and add also a text
05:05Transform and I want to go ahead and transform all the text. That is a headline and say by the way
05:10Please make sure that it's going to be capitalized
05:13capitalize
05:15By doing so if I click on refresh all my headlines should now make
05:20Basically all my headlines will have a headline
05:22Uh a capitalization notice also that now the font itself that was not actually getting
05:27Embedded in is now finally getting embedded. The reason was is I left here a comma by mistake
05:32So all this time we were looking at it. We actually did not see the font which was a big big
05:37No, no on our end
05:38But now our headlines are finally actually getting the font that we wanted them to get so that was a mistake that I made
05:44Because I didn't even know how that font looks like so make sure that you don't make that mistake. Okay
05:49So that was that was capitalizations. Um, we could also set it to underline. Sorry, um lower case uppercase
05:57none, which is our default, um, and
06:00That's about it. So the default would be basically none. So you wouldn't have to do anything
06:06um
06:07Or you would basically define if it's capitalized not capitalized and so on and so forth, right?
06:12So that's it. Those are really the text playing with text that we have
06:16There's quite a lot of other things in css3 as well
06:19But that's it for text really because in the next stage
06:22We're going to move into the paragraph level and talk about things we could do to a paragraph
06:27although in many ways
06:28The indentation that we created using the text indent already is touching to the paragraph level itself. So we're out from the font
06:35We're talking about the character level at this lecture and following on we're going to move on into the whole paragraph
06:40So see you in the next lecture where we continue exploring
