HOW TO MAKE HTML PROGRAMS
Today, as I was reading my previous blogs, I thought to tell you about "How to make an HTML program". When I was learning HTML, I faced many problems in running my codes, so I will be taking special caution for most common problems.
So,
What is HTML?
HTML stands for Hyper Text Markup language.
To understand primarily, we have shown an example.
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
Now, let's see the result.
My First Heading
My first paragraph.
- The
<!DOCTYPE html>
to show that this document is an HTML5 document. For lower version of html you can use <html>, instead of the above code. - The
<head>
the element contains headings and titles about the HTML page. - The
<title>
the element specifies a title for the HTML page. - The
<body>
the element defines the document's body. - The
<h1>
the element defines a large heading. - The
<p>
the element defines a paragraph.
<h1> is the largest heading however <h6> is the smallest heading.
We should always close the tags otherwise it won't work ( except for some basic tags like <hr> & <br>, which would be specified), we have closing tags like <html>-</html>,<body>-</body>,<h1>-</h1>
In every closing tag, there is a '/' mark.
- To input a horizontal line - <hr>
- To shift the text to the next line: same as enter - <br>
- To write same as written in the program (even spaces & enters) - <pri></pri>
- to insert img - <img src="file location">
- to insert link - <a href="link">
- to bold specific words - <b></b>
- to Italic specific words - <i></i>
- to Underline specific words -<u></u>
**************************
Some common problems
- "Colour"- If you follow British English, then it might be that your font colour tag won't work. HTML follows American English, in American English spelling of colour is - color, therefore you have to use <font color="green"> instead of <font colour= "green">
- "Font face"- If you want to change the font of the text (even me) then you may have tried once to change the font by using <font font=>or <font style=> but would be unsuccessful. If you want to change the font of the text then you should probably try <font face="font">
*********************************************
To run it,
I. Open notepad
- Write the commands
- Save the file by using "ctrl+s"
- Select the file type as all files
- Write the name of the file and use".html" at the last necessarily
- Click at the save button
To edit the program, open new notepad. Use "ctrl+o" select type as all types and select the file from a specific folder.
To run the program save as mentioned earlier, open it 'as chrome'. And refresh the page.
.Thank you for taking a visit to my blog I surmise that you will enjoy my blog. If you want more blogs like these, plz like, share, and subscribe to my channel to help others to reach them.
Good bro
ReplyDelete