Following the usual practice in teaching computer topics, we’ll add “Hello World” to our web page. To put text, you simply type it as if you were using a web processor. Now we can put the actual content of our web page in between and. We need a second tag called the body tag that indicates where the content of the web page is placed. Hence anything that falls between and is interpreted by the browser as being html. We also need the closing tag, so our file should look like this: To tell the browser that the following text is html, we use the html tag as. However you have to specify what every block of text is. That might seem strange since we just let it know that the document was an HTML5 document. Now we need to tell the browser where our HTML actually is. As written above, this tells the browser we are using the most recent version of HTML which is HTML 5. It lets the browser know what type of HTML you are using. The first line in your file is this one:Īs the name implies, this is called the Document Type Declaration. Now let’s get into the structure of an actual HTML document and real tags that are used. So to tell the browser that we are finished with tag_one, we would write: So for illustration, to tell the browser that a block of text is tag_one, the opening tag would be:Ī closing tag is indicated with a forward slash /. Inside the characters, you give the browser and instruction. You will need an opening tag and a closing tag. The format used to enter a tag is to enclose it in. The first thing you need to know is how to give instructions to the browser. Your First Webpage Now that we have an idea of what a web page and HTML file is and how to create one, let’s get our feet wet and start creating simple web pages. We will see how to enter the appropriate codes to do these tasks in future chapters. An HTML page can also have a style format which is done using CSS. In that case, the web address would be: Like a word processing document, an HTML file can include different fonts, colors, images, and links to other html pages. Lets say that we called that folder info. Then it would be referenced in the browser as: Īlternatively, you could create a folder in your home directory and place the about.html file in there. You could place an about.html page in this folder as well. In the public_html folder on the server, you would place the home page here. So for example, suppose you have a website. These other pages can be in the home directory or you can make a folder on your server and place the pages in there. The other web pages on the site will have different names pageone.html, pagetwo.html etc. There are some exceptions to this but for now that is how you can view the home page of a website. On your server you will place the index.html file in the home directory. In a nutshell this is an html file no different than any other, but it has the name index that tells the broswer to load this file when someone visits the website. When you type in a websites home address, such as or, what happens is the browser opens a special file named index.html. You can download it free here: A website is made up of multiple HTML pages. Although in this book we will be focusing on teaching HTML and CSS, Kompozer allows WYSWYG editing of web pages. The nice thing about Kompozer is that it allows you to preview your file in real time inside the application without having to save your html file and loading it in a browser. However if you are a Mac user I’m going to recommend a special HTML editor which is free called Kompozer. You can use Microsoft Word, Pages, or your built in text editors provided by the operating system. Since a HTML document is nothing but a text file, you can use any text editor to make one. To let the browser know the text file contains HTML, we use the file extension. For example, you can let the browser know that a certain string of text should be displayed as a header with bold font, or that the text should be centered on the page. Its basically just a text file with codes that tell the browser how to display the information. Simple HTML Editor HTML means Hypertext Markup Language.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |