What is HTML?
Hypertext Markup Language is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets and scripting languages such as JavaScript.Technically, HTML is a programming language.
- HTML stands for Hyper Text Markup Language
- 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
So, let's begin with HTML.
You can use any editor like visual code studio, sublime text, notepad, notepad++, etc.
To start with any language it is said that the basic part is to execute is the "Hello World", so, let us do that:
Create a new file and save with any name, for eg: helloworld.html and run the below given code.
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
Descriptions:
1. <!DOCTYPE html>
The <! DOCTYPE html> declaration is used to inform a website visitor's browser that the document being rendered is an HTML document.
2. <html></html>
The <html> tag represents the root of an HTML document. The <html> tag is the container for all other HTML elements (except for the <!DOCTYPE> tag).
3. <head></head>
In head tag we basically use the <title> tag, <link>,<script> for JavaScript. Remember that JavaScript can be written either in <head> tag or at the end of the <body> tag or separately in a .js file.
4. <h1></h1>
This tag is simply to define that the headings.
The other heading tags are:
- <h1>Heading 1</h1>
- <h2>Heading 2</h2>
- <h3>Heading 1</h3>
- <h4>Heading 1</h4>
- <h5>Heading 1</h5>
- <h6>Heading 1</h6>
Depending on the heading you use the size of the heading changes.
H1 is basically the one with larger font and the other headings font size decreases accordingly.
The above code can also run without writing Hello World! in <h1></h1> tag. You can simply write it as:
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
</head>
<body>
Hello World!
</body>
</html>
Follow - https://www.instagram.com/syntax3rror._/

Comments