Introduction

What is HTML?

  • HTML stands for Hyper Text Markup Language
  • HTML is the standard markup language for creating Web pages
  • HTML describes the structure of a Web page
  • HTML consists of a series of elements
  • HTML elements tell the browser how to display the content
  • HTML elements label pieces of co
Hello world
To get started with writing JavaScript, open the Scratchpad and write your first "Hello world" JavaScript code: function greetMe(yourName) { alert("Hello " + yourName); } greetMe("World"); Select the code in the pad and hit Ctrl+R to watch it unfold in your browser!
Editors

Web pages can be created and modified by using professional HTML editors.

However, for learning HTML we recommend a simple text editor like Notepad (PC) or TextEdit (Mac).

We believe in that using a simple text editor is a good way to learn HTML.

Follow the steps below to create your first web page with Notepad or TextEdit.

p { color: red; text-align: center; }
Elements

HTML elements can be nested (this means that elements can contain other elements). All HTML documents consist of nested HTML elements.

The following example contains four HTML elements (html, body, h1 and p)

The body element defines the document's body. It has a start tag body and an end tag (/body).

function greetMe(yourName) { alert("Hello " + yourName); } greetMe("World");
Attributes

HTML Attributes

  • All HTML elements can have attributes
  • Attributes provide additional information about elements
  • Attributes are always specified in the start tag
  • Attributes usually come in name/value pairs like: name="value"
function greetMe(yourName) { alert("Hello " + yourName); } greetMe("World");
Paragraphs

HTML Display

You cannot be sure how HTML will be displayed. Large or small screens, and resized windows will create different results.

With HTML, you cannot change the display by adding extra spaces or extra lines in your HTML code.

The browser will automatically remove any extra spaces and lines when the page is displayed

function greetMe(yourName) { alert("Hello " + yourName); } greetMe("World");
Styles

The HTML Style Attribute

Setting the style of an HTML element, can be done with the style attribute.

The CSS background-color property defines the background color for an HTML element.

function greetMe(yourName) { alert("Hello " + yourName); } greetMe("World");
Reference
    All the documentation in this page is taken from click here