I think you get the idea about the tag and attribute in the last lesson, now we going to do some work in action. But before going further, you need a good text editor and a latest updated browser. Now we are going to look into basic structure for an HTML page.
A basic structure of an HTML page
Although it’s not necessary to use the basic structure for an HTML page, but w3c ( World Wide Web Consortium) make some standards to follow. So one must follow the basic structure for an HTML page.
It is a very simple structure. Easy to remember. Now let me explain this step by step.
It tells browser or system that in which language this document is written. Here language is HTML. So browser will look for HTML tag and take it as HTML and render its content as HTML.
With html tag, the browser gets that here HTML code is written.
Head tag content is not showing on the web page. Only printable thing is the
<title> tag, which prints in the tab. Head tag contained meta-tags, stylesheet, title, internal CSS etc. Here only special tags are used. Which we will look in next lessons.
All the things shown on a web page is written within the body tag.
Create the first HTML page
Are you excited to dive into the world of web designing? I am pretty sure you are. Here are simple steps to follow.
- Create a folder on the desktop (or wherever you want) and name it anything. Please make sure if you are using the name of more than one word, then please add – instead of space. Space is not allowed in a URL and it show on some URL language. So for clean url use – instead of space.
- Now open text editor and copy below code.
<title>My First Website</title>
- And paste it text-editor and save it yourname.html in the folder that you created.
- Now open your folder and double-click yourname.html to view it in the browser.
- Right click and select open with and chose your favourite browser to show there, in case it is not open there.
- Now change the title and h1 tag value and save it. Then refresh the page in the browser.
- Text inside <title></title> will show on browser’s tab, so change it, save and refresh the page in the browser.
That’s all for this lesson, in the next lesson we will learn about the some basic tags.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?