Skip to content

cra2ycoder/tutorial-html

Repository files navigation

tutorial-html

A complete html and html5 tutorial for study

What is HTML?

  • expands Hypertext Markup Language
  • standard markup language for creating web pages and web applications.
  • uses for appearance/presentation CSS
  • uses for functionality/behavior JavaScript.

What is Markup Language?

  • A markup language is a computer language
  • uses tags to define elements within a document.
  • markup files contain standard words, rather than typical programming syntax.(In simple, It is human-readable)

What is HyperText?

  • refers to links that connect web pages to one another, either within a single website or between websites.
  • Links are a fundamental aspect of the Web.
  • By uploading content to the Internet and linking it to pages we will become active participant in the World Wide Web

What are tags?

  • tags are basically surrounded by < and > (angle brackets)
  • the name inside a tag is case insensitive
<title>
<TITLE>
<Title>

HTML Basics

Anatomy of an HTML element

structure

NOTE:

  • open tag and close tag should have the same name
  • close tag must be contained a / (forward slash)
  • Note that, there are some tags which doesn't have the close tag by default.

attributes

  • used to add extra information about the tag, which will not be shown in the page

Usage:

  • to fetch the correct element through the javascript
  • to write css for styling
  • to data maintaining

NOTE:

  • attributes must be defined inside the open tag only.
  • custom attributes can be added
  • attributes can be n number in one tag
  • syntax: propertyName="propertyValue" (example: class="my-class")
  • propertyValue should be surrounded by the "" (double-quotes)

Empty elements

  • Some elements have no content and are called empty elements. (ex: <img />)
  • which element doesn't have the content as well as close tag then those are called empty elements

Anatomy of an HTML document

structure

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>My test page</title>
  </head>
  <body>
    <img src="images/firefox-icon.png" alt="My test image" />
  </body>
</html>

<!DOCTYPE html>

  • to define the doctype and the version

<html></html>

  • root of the html document, or wrapper

<head></head>

  • its a container
  • help to include some stuffs which are like, css, script and meta information

<meta charset="utf-8">

  • the character set your document should use to UTF-8
  • not required to use, but it would help us to resolve some problems in later

<title></title>

  • your document title
  • which will be displayed in the Browser Tab
  • used for: bookmark/favourite

<body></body>

  • used to show content in the browser
  • like: text, images, videos or whatever

What is the use of UTF-8?

  • UTF-8 is a compromise character encoding
  • can be as compact as ASCII (if the file is just plain English text)
  • can also contain any unicode characters (with some increase in file size).
  • UTF stands for Unicode Transformation Format
  • The 8 means it uses 8-bit blocks to represent a character.

What are the markup languages available?

Core Pieces

About

A complete html and html5 tutorial for study

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages