Skip to main content

Introduction to HTML

HTML Introduction

HTML Introduction

HTML is the standard markup language for creating webpages.


What is HTML?

  • HTML stands for Hyper Text Markup Language.
  • HTML describe the structure of a webpage.
  • HTML consists of series of elements.
  • HTML elements tell the browsers how to diplay the content.
  • HTML element label pieces of content such as "this is a heading", "this is a paragraph", "this is a link", etc.

A simple HTML Document

Example


<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

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


    Example Explained
  • The <!DOCTYPE html> declaration defines that this document is an HTML5 document.

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

  • The <head> element contains meta information about the HTML page.

  • The <title> element specifies a title for the HTML page (which is shown in the browser's title bar or in the page's tab).

  • The <body> element defines the document body, and is a container for all the visible contents, such as heading, paragraph, images, hyperlinks, list, tables etc.

  • The <h1> element defines a large heading.

  • The <p> element defines a paragraph.


What is an HTML element?

An HTML element is defined by a start tag, some content, and an end tag:

<tagname>Content goes here...</tagname>

The HTML element is everything from the start tag to the end tag:

<h1>My First Heading </h1>

<p>My First paragraph </p>

Start tag Element content End tag
<h1> My first heading </h1>
<p> My first paragraph </p>
<br> none none

Note: Some HTML elements have no content (like the <br> element).
These elements are called empty elements. Empty element do not have an end tag!

Thanks for visit!!!

Comments

Popular posts from this blog

Difference between HTML, CSS and Java Script

Difference between HTML, CSS and Java Script HTML/XHTML HTML (HyperText Markup Langage) is the language used to create web page documents. The updated version, XHTML (eXtensible HTML) is essentially the same language with stricter syntax rules.It is common to see HTML and XHTML referred to collectively as (X)HTML, as (X)HTML is not a programming language; it is a markup language, which means it is a system for identifying and describing the various components of a document such as headings, paragraphs, and lists. You don’t need programming skills—only patience and common sense—to write (X)HTML. Everyone involved with the Web needs a basic understanding of how HTML works. The best way to learn is to write out some pages by hand, If you end up working in web pr...

HTML Elements

 HTML Elements An HTML element is defined by a start tag, some content, and end tag. The HTML element is everything from the start tag to the end tag: <tag name> Content goes here....</tag name> Examples: <h1>First heading</h1> <p> First paragraph</p> Starting tag: <h1> Ending tag: </h1>  Element content: First heading Note: Some elements have no content (like the <br> element). These elements are called empty elements. Empty elements do not have an end tag!. Nested HTML Elements: HTML elements can be nested (this means that element can obtain other elements). All HTML documents consist of nested HTML elements.  The following example consist four HTML elements(<html>, <body>, <h1> an d <p>). <!DOCTYPE html> <html> <body> <h1> First heading </h1> <p> First paragraph </p> </body> </html> Example explained The <html> element is the ...

What are some of the best ways to learn programming?

1. Pick a language   with a purpose. Before you start learning code for the first time or continue your education, you should have a clear understanding of what you want to learn and why you want to learn it. Do you prefer developing games to developing websites? Think about data science. Before choosing a programming language, you should have a goal in mind because different languages have different uses. If you are interested and engaged in the subject, you will have a better understanding of the material and move much more quickly. 2. Start learning the fundamentals. Start at the bottom and work your way up once you've chosen a language to learn. Even though you might be tempted to enroll in intermediate courses or try taking multiple classes at once, it is best to master the fundamentals before moving on. You run the risk of making mistakes when you skip over the fundamentals of programming, which will become apparent as you progress through more challenging readings. After th...