What is HTML? Introduction to HTML Codes

What Is HTML? Introduction To HTML Codes




Introduction To HTML CODING


HTML is a tag language used to create web pages that are viewed in the browser. What is meant by HTML is that a .html file should be viewable by all browsers regardless of whether the visitor is on a PC or Mac. Then it is required that you code correctly. With HTML, you structure your website with the help of tags. For example: If you want to make part of a bold text, start writing <strong> and end with </strong> .
or . All tags can be written in capital letters, such as or. All tags are called elements. There are also some options for the different tags. We may want a text to appear in the color red. Then we type <font color = ”red”>My red text </font> . The element we are using now is <font>  and it has an attribute called color . Then we write what color we want. An attribute must have a space between the tag name and the attribute name. If we write then it is interpreted incorrectly and then the text does not turn red. The browser interprets the various tags and prints the content itself. If you have written the wrong code, your browser will not be able to interpret the tags and it will usually be wrong. There are different versions of HTML. Right now, HTML 4.0 is the version you use most. HTML 5 is a new version but not all browsers support that version.

HTML document


An HTML document can be created in any text editor but should be saved with the .html fileextension. Most people use Notes (Notepad) to write code in, but it is recommended to get a more advanced text editor, eg. Notepad ++ or Eclipse. After you have saved your .html file, you should open it in your browser. When saving a file, do not use å, ä or ö. A recommendation is to always spell filenames with lowercase letters. An important thing about the HTML tags is that they must be completed before another tag starts. The following HTML code is correct:

<strong> <em> My Text </em> </strong>

This code is incorrect.

<strong> <em > My Text </strong> </em>

If you start writing <strong>  and then you forget to write a final tag to it then everything will be in bold. Never forget to end a tag.

An example of an HTML document

A simple HTML document can be seen below

.<!DOCTYPE html /><html><head><title data-react-helmet="true">

<html>

<head>

<title>Introduction to HTML CODING</title>

</head>

<body>

<h1>hello</h1>

<p>Introduction to HTML CODING .</p>

<img  />

</>

</>> > > > > > </> . > > >  > </> > > > > , <> > </>  />

ความคิดเห็น