Welcome to lesson #3 of this HTML Basics Course.
In this lesson you will learn how to add basic text to a webpage with HTML.
You can access all the lessons by clicking the links below:
- What is HTML?
- Adding Structure To a Webpage With HTML
- How To Add Text To a Webpage
- How To Add an Image To a Webpage With HTML
- How To Link Webpages Together
- How To Create a List With HTML
You can watch the video version of this lesson below:
Hey everybody, welcome back to the course. In this lesson, we’re going to talk a little bit about adding text to a webpage and what’s the correct way to do it.
First of all, what we’re going to do here is we’re going to change some settings that we have. I’m going to go ahead and change my h2 element, and I’m going to change the text that displays in the middle here to something completely different, and I’m also going to change the h1 to my name.
Now we have a paragraph element here. First of all, I’m going to delete that. I’m just going to write out some text just to show you guys how the web browser will interpret text if we just write it without the paragraph tag. I’m just going to write a bunch of little text here, some information about myself.
All right, so now I’m going to add another paragraph right below it.
Okay, so we have these two paragraphs here, and we can see here that as we write them, there’s a space in the middle here.
I’m going to save this document, and when we refresh our document, we can see here that there is no space.
All the text is just squished together, and the web browser did not interpretate that space there. It just put all the text together, and this is what happens if you don’t use the paragraph element tags.
If I add a paragraph tag here to this line of text and then another paragraph element tag to this chunk of text, you’ll see that it’ll actually space the text out the way we want it to look in the web browser.
There you go. That looks much better and is a lot more cleaner to read.
That’s pretty much the basics of adding text into an HTML document.
Text looks pretty boring as it is right now, but once you start learning CSS, you can do all kinds of different styling options to make your text look a little bit more exciting.
I’ll see you in the next lesson very soon!
P.S – I teach many different web developing courses on Udemy. If you are interested in learning how to build your very first website with HTML and CSS check out the link below: