ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

How to Build a Website: HTML Basics

Updated on March 30, 2010

This hub is from a series of hubs I'm writing called "How to Build a Website". This is the second hub from this series, do not forget to read the first one where I introduce the basics of the whole process of developing your first website.
In this hub I'm going to give you an introduction to the HTML language.

HTML (Hyper Text Markup Language) is the basic language to create a website. It can also work together with languages like CSS, JavaScript, PHP and others to improve you website and add extra features.

Now you can follow my instructions to get you first basic webpage working.

HTML works with tags. A tag is marked by < > and will define what you are doing.
For example, if you want a new paragraph you start with <p> and finish with </p>.
The code for Finishing tags is exactly the same as for the Opening one but with a / (forward slash), as you see in the example. Don't forget to close every tag you open.

Let's write a basic HTML template. This is the code to use to always start your pages:

If you just copy this code to a text editor software ( you can just use notepad ) and save the file as index.html you have your first page. Well, not really, this is indeed a page but at the moment it is completely blank.
Whatever you want to display on your page will go inside the "body" tag.

Let's imagine you want to write "welcome to my first website". Here is the code:

welcome to my first website

Again, if you just copy or type this code into a notepad file and save it as index.html your file will be saved as an internet file and once you open it, you will see a white page with the text "welcome to my first website" on it.

If you have your own domain and your webserver (new hubs will be added soon about these subjects) you can just copy this file into it and when somebody types your URL (domain name) they will get exactly the same result as you see on your computer when opening the internet file you just created.

Of course this is a very basic start. More hubs will follow with many more steps for you to follow and keep learning about HTML.
For now I will finish with a sum up of the tags you just used.

<html> </html> - This opens and closes the html page. It is the main tag that defines your page and your code. Everything within will be your html code.

<head> </head> - This is your head tag. It is where you define the topic and the connections to other files like JavaScript or CSS. Almost everything relevant to the page, apart from content, goes in here.
<title></title> - This is the title tag. Everything you write inside this tag will be displayed on the top bar of the browser (eg: Internet Explorer) and will be the title of your page. Each individual page you create on a website can have a different title. It always opens and closes inside the "head" tag.

<body> </body> - This is the body tag. In here you add all your content. Inside the body tag is where all your main code will be. Here you will be able to add many extra tags, text, links, etc... In the previous example we just added a sentence, and as you could see, it is displayed on your page as, and so will be everything else you add.

Hope you enjoyed and learned something from this hub. More hubs will follow that will complement this one.


    0 of 8192 characters used
    Post Comment

    No comments yet.


    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at:

    Show Details
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the or domains, for performance and efficiency reasons. (Privacy Policy)
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)