HTML stands for Hyper Text Markup Language. It is mainly used for adding content to a website. The information which you see on a particular...
HTML stands for Hyper Text Markup Language. It is mainly used for adding content to a website. The information which you see on a particular website is only because of HTML. You can run HTML codes in an IDE like Visual Studio, Sublime text, Atom and many more. IDE (Integrated Development Environment) is basically a software where you can run all your codes. In this IDE you can run CSS, JavaScript , Python and many other programming languages as well.
First of all to write HTML code you have to make a folder in your devices ( in Computer /Laptop) where ever you like with whatever name you want. Now create a file in it with an extension .html such as index.html. This files can be made in IDE as well. Open this folder in any IDE which you prefered. Open the file index.html in it.
Now comes the main part you have to write HTML Boilerplate.
So what is HTML Boilerplate :
IDE can understand about HTML only after the format of HTML. HTML format should be written in IDE which is known as HTML Boilerplate. Mainly it consist of head and body section. In head you can add meta tags, titles and link other files into it such as CSS file or JavaScript file. The body is the main part where you can add content to your web pages. It basically describe the structure in a Web page
There are shortcuts for HTML Boilerplate in IDE by which you can get HTML Boilerplate format such as in Visual Code type ! then a dialog box will appear like this
where you will see Emmet Abbreviation. Enter it and the Boilerplate code will be added to your index.html .
Now we will run Hello World in it.
So after the Boilerplate in body section write like this
That's it. Save it and then you can view it by going to the path where your folder exist in your device. Click it then double click to index.html and that's it. You can view Hello World in any browser which you set to default.
Here h2 is heading. Basically in HTML there are h1 to h6 elements used for heading. h1 have bigger size than h2 and this goes on till h6 i.e h1>h2>h3>h4>h5>h6 in size.
Now come to a simple HTML examples:
Explanation of this program:
The <html> element is the root element of an HTML page.Then comes head and the body. In head first of all there is meta tag which used for responsive website and for SEO. Responsive websites are made that are viewed correctly in all devices from Computer, Laptop to all types of Mobile. SEO stands for Search Engine Optimization used mainly to rank their website in Internet.
In body you can write your code which you have to display in Web pages. Below code shows the height from h1 to h6 for headings and <p></p> is used for adding paragraphs in Web pages.
HTML works on predefined element which have open and close tag for instance <opening tag> </closing tag> such as
<p>Heading can be written from h1 to h6 only.</p>.
Here <p> is opening tag and </p> is closing tag.
Want more just subscribe to our website and be updated.
COMMENTS