Mobirise
Create awesome websites!
site builder
  1. HTML Tutorial Try it now!
  2. CSS  Tutorial  Try it now!
  3. JAVASCRIPY Tutorial Try it now!

What is HTML ?

HTML is the standard markup language for creating Web pages.

HTML stands for Hyper Text Markup Language
HTML describes the structure of Web pages using markup
HTML elements are the building blocks of HTML pages
HTML elements are represented by tags
HTML tags label pieces of content such as "heading", "paragraph", "table", and so on
Browsers do not display the HTML tags, but use them to render the content of the page

Example Explained 


 The <!DOCTYPE html> declaration defines this document to be HTML5


The <html> element is the root element of an HTML page


The <head> element contains meta information about the document


The <title> element specifies a title for the document


The <body> element contains the visible page content


The <h1> element defines a large heading


The <p> element defines a paragraph

Write HTML Using Notepad or TextEdit

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 using a simple text editor is a good way to learn HTML.

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

Step 1: Open Notepad (PC)

Windows 8 or later:

Open the Start Screen (the window symbol at the bottom left on your screen). Type Notepad.

Windows 7 or earlier:

Open Start > Programs > Accessories > Notepad

Step 1: Open TextEdit (Mac)

Open Finder > Applications > TextEdit

Also change some preferences to get the application to save files correctly. In Preferences > Format > choose "Plain Text"

Then under "Open and Save", check the box that says "Ignore rich text commands in HTML files".

Then open a new document to place the code.

Step 2: Write Some HTML

Write or copy some HTML into Notepad.

<!DOCTYPE html>
<html>
<body>
<h1>My First Heading

</h1>
<p>My first paragraph.</p>
</body>
</html>

Mobirise

Step 3: Save the HTML Page

Save the file on your computer. Select File > Save as in the Notepad menu.

Name the file "index.htm" and set the encoding to UTF-8 (which is the preferred encoding for HTML files).

Mobirise

Step 4: View the HTML Page in Your Browser

Open the saved HTML file in your favorite browser (double click on the file, or right-click - and choose "Open with").

The result will look much like this:

Mobirise

Don't worry if these examples use tags you have not learned.
You will learn about them in the next chapters.

HTML Documents 

 All HTML documents must start with a document type declaration: <!DOCTYPE html>.
The HTML document itself begins with <html> and ends with </html>.
The visible part of the HTML document is between <body> and </body>.

Example 

<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>

HTML Headings 

TML headings are defined with the <h1> to <h6> tags.
<h1> defines the most important heading. <h6> defines the least important heading: 

 

Example 

<!DOCTYPE html>
<html>
<body>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
</body>
</html>


This is heading 1


This is heading 2


This is heading 3


This is heading 4


This is heading 5

This is heading 6



We belive in you  

HTML Paragraphs

HTML paragraphs are defined with the

tag:

<p>This is a paragraph.</p>
<p>This is another paragraph.</p>


This is a paragraph.

This is another paragraph.

HTML Links

HTML links are defined with the tag:

Example

<a href="https://enanedu.github.io">
This is a link</a>

This is a link

HTML Images 


HTML images are defined with the <img> tag.
The source file (src), alternative text (alt), width, and height are provided as attributes

<img src="https://enanedu.github.io/" alt="https://enanedu.github.io/" width="104" height="142">


Mobirise

CSS Tutorial

CSS is a language that describes the style of an HTML document.

CSS describes how HTML elements should be displayed.

This tutorial will teach you CSS from basic to advanced.

Examples in Each Chapter


This CSS tutorial contains hundreds of CSS examples.

With our online editor, you can edit the CSS, and click on a button to view the result. 

 CSS Example

<!DOCTYPE html>
<html>
<head>
<style>
body {
    background-color: lightblue;
}
h1 {
    color: white;
    text-align: center;
}
p {
    font-family: verdana;
    font-size: 20px;
}
</style>
</head>
<body>
<h1>My First CSS Example</h1>
<p>This is a paragraph.</p>
</body>
</html>








My First CSS Example


This is a paragraph.