Page 76 - Trackpad_V5_Book 6
P. 76
To view a webpage in a web browser: Open the folder in which you have saved the HTML document.
CREATING AND SAVING AN HTML DOCUMENT
Locate the file and double-click it. The web page opens in your default web browser window.
To create an HTML document, open a text editor (here, we have used Notepad) and type the code.
PURE On August 06, 1991, the first ever website named info.cern.ch was published by
FACT Tim Berners-Lee at CERN in Switzerland.
Now that you know how to create an HTML document and view it in the browser, let us explore
some of the tags that can be used to align and style the page content in the body section.
To save an HTML document, follow the given steps:
1 Click on the File menu. <P> TAG
<P> tag is used to insert a paragraph in an HTML document. A paragraph begins with the <P> tag and
ends with the </P> tag. The browser automatically adds a vertical space before and after each <P> tag.
ALIGN ATTRIBUTE
A paragraph can be aligned using the Align attribute. Various values of the Align attribute are
given in the table below.
3 Type a name for the webpage.
Make sure you add the .html or .htm
extension to the webpage name. Value Description Example
Left Left-aligns the text. <P Align = “Left”> Text goes here. </P>
2 Click on the Save As option. 4 Click on the Save button.
Right Right-aligns the text. <P Align = “Right”> Text goes here. </P>
21 st Center Center-aligns the text. <P Align = “Center”> Text goes here. </P>
Century #Responsibility
Skills
“You should always check your code to avoid errors. Make sure your Justify Stretches the lines so that each line has <P Align = “Justify”> Text goes here. </P>
tags have angular brackets and the closing tag includes a slash, and an equal width.
the values of attributes are enclosed in double quotes.”
-Mr Techie
<BR> TAG
DISPLAYING A WEBPAGE IN A WEB BROWSER By default, all the text we type in an HTML document appears in one line. We can insert a line
After creating and saving an HTML document, we can view it in a web browser. In this example, break to shift the text to go to a new line. The <BR> tag is used to insert a line break in an HTML
we are using Microsoft Edge. document. <BR> tag is an empty tag and does not require a corresponding closing tag.
74 Pro (Ver. 5.0)-VI

