The HTML Code

.com

 

HTML tag

 

The tags that define headings, paragraphs and line breaks are the basics HTML tags.  If you put the text below in a Windows Notepad file and save it as MyHTML.htm you can create a simple web site (simple may be too generous a word).

<html>

<body>

The text here should be the only thing viewable in your browser.

</body>

</html>

Technically it isn't a website unless it's published but we won't worry about the technicalities. The text surrounded by “< >” are tags. Unless it’s an empty tag, there will be a tag that signifies the start “< >” and one that shows the end or close of a tag     “</ >”.

To view the HTML file in your browser open your Internet browser. From the “file” menu go to “open” then “browse” to MyHTML.htm and click “open”.

 Depending on your directory structure you should see “C:\MyDocuments\myhtml.htm” in the browser address field. Double click the myhtml.htm file and it should open in a browser window. 

Tags for Headings are defined with the <h1></h1> tag. Actually, the HTML tag for heading is <h1> through <h6>.  The <h1> tag is the largest (font) and <h6> is the smallest.  You can also use your MyHTML.htm file to see the different sizes of the HTML heading tag.  Copy and paste the info below to the same file .htm file.

<h1> Header text goes here!</h1>

<h2> Header text goes here!</h2>

<h3> Header text goes here!</h3>

<h4> Header text goes here!</h4>

<h5> Header text goes here!</h5>

<h6> Header text goes here!</h6>

 The paragraph is defined as “<p></p>”.  This tag can be placed between the HTML body tags <body></body>.  The paragraph tags are great because you can type text in an unformatted fashion in your HTML editor and as long as it is within the paragraph tag it will be properly formatted when viewed in a browser.  Use the information below for your example.

<p>Mary had a little lamb whose fleece was white as snow. Everywhere that Mary went the Lamb was sure to go.</p>

<p>The Lamb followed Mary to school one day which really wasn’t allowed. The Lamb sat outside the classroom and caused quit a crowd.</p>

 When you want to end a line but don’t want to start a new paragraph, the tag signifying a line break is used.  The <br> tag is an empty tag; meaning it doesn't need a closed tag </br> to work.

<p>Paragraphs with <br> can be used as a para<br>graph formatting tool.</p>

 

HTML (home) | Sitemap | Contact us