Introduction - SwatiMaurya08/html-notes GitHub Wiki
What is HTML?
HTML stands for Hyper Text Markup Language. It is used to design web pages using markup language. HTML is the combination of Hypertext and Markup language. Hypertext defines the link between the web pages. Markup language is used to define the text document within tag which defines the structure of web pages.
- 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 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
HTML tags are element names surrounded by angle brackets:
<tagname>
content goes here...</tagname>
- HTML tags normally come in pairs like
<p>
and</p>.
- The first tag in a pair is the start tag, the second tag is the end tag.
- The end tag is written like the start tag, but with a forward slash inserted before the tag name.
Tip: The start tag is also called the opening tag, and the end tag the closing tag.
<DOCTYPE! html>
: This tag is used to tells the HTML version. This currently tells that the version is HTML 5.
The <!DOCTYPE>
declaration represents the document type, and helps browsers to display web pages correctly.
It must only appear once, at the top of the page (before any HTML tags).
The <!DOCTYPE>
declaration is not case sensitive.
The <!DOCTYPE>
declaration for HTML5 is:
<!DOCTYPE html>
Features of HTML:
- It is easy to learn and easy to use.
- It is platform independent.
- Images, video and audio can be added to a web page.
- Hypertext can be added to text.
- It is a markup language.
Why learn HTML?
- It is a simple markup language. Its implementation is easy.
- It is used to create a website.
- Helps in developing fundamentals about web programming.
- Boost professional career.
Advantages:
- HTML is used to build a websites.
- It is supported by all browsers.
- It can be integrated with other languages like CSS, JavaScript etc.
Disadvantages:
- HTML can create only static webpages so for dynamic web page other languages have to be used.
- Large amount of code has to be written to create a simple web page.
- Security feature is not good.