e-Book Computer – The previous tutorial begins with the Introduction HTML, the discussion this time discusses the definition of Understanding Tags, Elements, And Attributes in the form of theory, where the theory aims to open up an overview of the HTML language. As I said earlier, HTML is not a programming language but a marking language that has a structured and structured arrangement according to marking tags with each of its functions so that the browser can know what the order of the code will be executed like.
How can the browser recognize commands given to HTML documents?
In HTML language there are structured patterns so that the browser can be identified, the arrangement is tags, elements, and HTML attributes, so that a web page can be translated into a visual form based on the commands given, for example, a text, usually the text has a style like bold, italic, underline etc., the style has different commands. In other cases, a style can be implemented simultaneously, so that it forms text prints that have many styles where a command is executed in one element.
Before going forward, there are a number of articles that you might be looking for.
Read too :
For more details, let’s separate each tag function, element, and HTML attribute into a discussion that is easier to understand.
Understanding HTML Tags
A tag is a core part of HTML, which is why HTML is called a language markup because it is based on marking each object that is sandwiched between tags, from which the browser will recognize what the output will be like. A tag is a special text (command) between two characters “<” and “>” which distinguishes between plain text so that the browser recognizes to be translated into a visual form based on the command given, usually a tag is written in pairs (opening tag and closing tag ) but there is a single tag that does not require a cover.
For example, the <head> tag, this tag serves to provide information to the browser about HTML documents, all the contents in this head tag will not display output to the monitor screen, so this tag must use the cover </ head> to distinguish between document information and document contents.
Unlike a single tag, where a single tag does not require a closing tag, for example <hr> to print a whole line, <br /> to make a new line, and many more.
Understanding HTML Elements
Elements are all contents that are inside the tag, between the opening and closing tags, the basic example is this <tag> Element </ tag>. Whereas in other cases when you want to print bold and italic text on one element you can add both functions simultaneously, usually it can be said to be nested tags, almost every element has nested tags.
Writing nested elements may not be written crossed, closing tags for elements must be based on the initial sequence of opening tags, so that they do not overlap each other.
Examples of writing correct nested elements.
Example of writing the wrong arrangement of elements.
Most HTML documents are written in nests so accuracy is needed so as not to cause errors in writing HTML documents.
Understanding HTML Attributes
Attributes are additional information that is inserted in a tag, where the information can be in the form of an instruction in the background color or color of the text, the length, and width, and can be in the form of naming a class and id. Attributes in one tag can be more than one and separated by using two quotation characters and have different names and values.
<tag name-attribute = “value-attribute”> </ tag>
For example, giving background color and text color to the opening element of the HTML document content.
<body bgcolor = “red” text = “white”>
<b> Example of giving color to an element </ b>
From the above command will be translated by the browser a document background color has a red color and white text, the sample image as below.
For writing names and attributes, it is strongly recommended to use lowercase letters and must be careful in giving two quotation marks.
Final words in this theoretical tutorial can hopefully provide an understanding of tags, elements, and HTML attributes before entering other material that prioritizes practice.
Before proceeding, there are a number of articles that might be looking for.
Also read :