HTML Top Exercises
A website is simply a collection of web-pages. A web page or web documents written in
HTML (HyperText Markup Language). These Web pages can be viewed using any web browser and Internet.
Html Language is used to write code and programs to create a webpage. It is easy to create a webpage and you can learn it with few basic steps mentioned below:
HTML Program or page can be created by many HTML or Text Editors. These editors are software that help us writing our code with easy user interface. Today, we will see how to create a html or webpage using Notepad Editor.
Notepad editor is built-in text editor in Windows Computers. You can find similar editors in Mac and Linux Operating system as well.
There are many advanced HTML editor or software are also available. However, we will recommend using default and simple editor like notepad for the beginners. That is always a good way to start learning HTML.
Creating a Simple HTML Page using Notepad Editor
Follow the four steps below to create your first web page with Notepad.
Step 1: Open Notepad (Windows)
Windows 8 or later:
Open the Start Screen and Search (Type Notepad)
Windows 7 or previous Windows:
Open Start > Programs > Accessories > Notepad
Step 2: Create a New Document
Go to Notepad Menu:
File > New
A New blank document will be opened and you can start writing your first HTML Program here.
Step 3: Write Some HTML code or Program
Write some HTML code. If you do not know about HTML Yet, read few chapters in HTML Tutorials Section.
Write your own HTML code or simply copy the following HTML Simple Program into notepad document.
<!DOCTYPE html> <html> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html>
Step 4: Save the HTML Page
Go to Notepad Menu:
File > Save (or use short-key CTRL + S)
It will ask you to Save the file on your computer. Give it a name with .html extension and Save it (for example program.html)
Note: HTML page should be saved with
.html extension carefully.
Step 5: View the HTML Page using Browser
Web browsers are programs or software that are used to view Webpages/Websites. You can find Internet Explored by default if using Windows Computer machine. You can also download other popular web browsers such as Google Chrome or Firefox. Use any of them.
Now Simply, open the saved HTML file in any browser:
Double click on the file or right-click on the file and choose “Open with” option to select other browser.
You HTML File will be opened in web browser and it will show output based on your html program.
Congratulations if you are able to run your first HTML Program.
You can now learn more about HTML Tags and create more HTML web pages. Using these HTML Pages, you can easily create your own website as well.
We can write some text in body and it will be displayed in browser. All text will be displayed in single line until it reach browser window border. If you want to add some line break, you can use
Another option is to use text between paragraph tag. You can use multiple paragraph tags to display multiple text paragraphs.
Different between HTML Paragraph & Regular line break:
<br/> tag, it only add a single line break. While using
<p> tag it creates a paragraph with extra spacing before and after the paragraph.
<html> <head> <title> Different between HTML Paragraph & Regular line break | TutorialsClass.com </title> </head> <body> This is regular text. <br/> This is another line after line break. <p>This is a first paragraph. You can add any kind of text here. </p> <p>This is a second paragraph. This is some sample text. </p> <p>This is another paragraph. You can add multiple lines of text in this paragraph. </p> </body> </html>