001-introduction-to-html_en
001-introduction-to-html_en
CSS files, your JavaScript files into a website that should be displayed.
that says that our website should have a title called hello and in the body,
it will open it up and display it like so with the title of the website
showing up in the body of our website. So before we dive deep into this,
it's really important to remember that HTML is the foundation of all websites.
So for example,
you won't see websites that are created using just a CSS file or just a
JavaScript file, but you can create websites using just an HTML file.
Now it might not look great. It will probably look like came from the nineties,
you might have heard of things such as XML, extensible markup language,
And all of these languages share a common history. They're based off the markup
that used to be put into manuscripts where editors would mock up the manuscript
and either specify changes to the author or specify structure and layout to the
you might have the squiggly line that shows the publishers that this part should
be printed in bold,
or this part should be printed in italics. And HTML works in much the same way.
You can specify the layout and structure of your website by using HTML tags.
then we can have a look and have a play around with real-life HTML.
just head over to codepen.io and then hit create new pen.
And then we're going to change the view to a format like this.
and these are the places where we're going to put our code.
So as you can see codepen lets you put in HTML, CSS, and JavaScript,
which will together get interpreted and get shown on the left as your website.
you get taken to the adventures of Sherlock Holmes by Arthur Conan Doyle.
So one of my favorite books of all time. If you have a look down here,
you can see that you can view the book as plain text,
you can see that it has laid out the book where a structure that is more human
you can see that all of this text gets put onto the screen with absolutely no
So the first thing we can see is that this is the largest heading on the page.
So we can make our website look like that also by adding an h1 tag into our
HTML. So the tag starts with angular brackets and end with angular brackets
and in the middle is the type of element or the type of tag you want to use.
Now,
it's really important that when you open tags that you also close them because
as you can see here, I've got an open tag but I have yet to close it
and it thinks that the entire contents of my page should be made into the
but then I have to use a forward slash and then write h1.
I would say that this word by is a little bit smaller than the author name.
but in a smaller size and shown with less important than the big title.
which is the smallest font size for the heading element. Now,
And the reason why I'm talking about it so early on is because of how important
any sort of programmer is getting good at finding out how you can help yourself.
How do you find the specific piece of information that's going to help you
achieve what it is that you want or help you understand what it is that you want
and I'm going to add in the name of the documentation that I prefer to use,
So the same people who made Firefox, for example. So if I go ahead and hit
you can learn more about the heading elements used in HTML
and they even have example code snippets that show you what it would look like
So let's see if we tried w3 schools with HTML and we're talking about
and you've got a little bit of notes that tell you how you should be using your
headings.
and it's worth reading through when you're first coming across a particular
element.
That way you'll have a good foundation of knowledge when you start to build and
and this is basically a website that puts together a lot of the useful documentation
and we go into the elements, we can see that there's a total of 135 elements.
And if you scroll down, you can see that we've got h1 through to h6.
And if you click on any of these then it brings up
but it's just structured in a very simple way, and it's very easy to follow.
9.
So the next thing that we need to do in order to better replicate this website
you'll be able to simply just hit enter a few times or hit return a few times
we actually have to use an HTML element called a line break and it's written
like so.
And the interesting thing about this HTML element is that it doesn't require
you can see that we started out by marking the text with an h1