how to type an HTML document in computer
Answers
Answer:
what is HTML ?
HTML is a basic web language used to design websites.
so now let us see where we write a program in html:
go to your start button and search for notepad and open it. notepad is the place to make a HTML code.
now as we have opened notepad , let us come to coding.
every html programme contains a <html> tag
followed by <head> tag
under head tag,
we add title with a <title> tag.
remember that you should end every tag
then end title with </title> tag
then end the </head> tag
then open the <body> tag
type your content in it
then close the body tag with</body>
now end the html with </html> tag
the below is a small coding,
<html>
<head>
<title>a basic structure</title>
</head>
<body>
a basic code in html consists of html tag,head tag,title tag,body tag.
</body>
</html>
this has to be saved as with a html extension.
for example i am saving it as ram, then it is ram.html
then you can save it in desktop,
then you can see the output of your html code
now i will say the codings for more things:
- we can insert background colour of red if i want red using <bg color = "red">
- HTML includes six levels of headings, which are ranked according to importance.
These are <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>.
- To create a paragraph, simply type in the <p> element with its opening and closing tags:
- HTML documents consist of nested HTML elements. the body element includes the <p> tags, the <br /> tag and the content.
- if my image is saved as image in the form of jpeg then i can use <img src="image.jpg" />
- for linking use <a href=" your file name.html"></a>
- an ordered list starts with <ol> tag and an unordered list starts with <ul> tag
- the attachment is the output of above coding
- the html canvas is used to draw graphics. the below is an example of using canvas element.<canvas id="canvas1" width="200" height="100"> </canvas>
- The Geolocation API’s main method is getCurrentPosition, which retrieves the current geographic location of the user's device. navigator.geolocation.getCurrentPosition();
HTML is not a programming language but it is a language which is used to create most basic (layout of a website). HTML is the basics of basics. without HTML we cannot create websites.
★ How to type an HTML Document in a Computer?
In this HTML Code Play, we are using an inbuilt editor and a browser, so no need to follow the steps.
- In computer you need an editor (eg. notepad/notepad++) for typing HTML code.
- Open an editorType your HTML code. Save the file with (HTML) extension. To execute the code just double click on the html file. This file will open in your default browser and you can see the program output.