What is HTML?
In order to understand what HTML is and what it consists of, we're going to need to understand some new vocabulary.
HyperText Markup is the predominant markup language -- a system for annotating text such that the annotations are syntactically distinguishable from the text -- for webpages. HTML is written using HTML elements that consist of tags. A tag is enclosed in angle brackets and commonly consist of three parts: a pair of tags, attributes, and content between the tags. The pair of tags consists of a start tag and an end tag, where the end tag's name is preceded with a slash character ("/"). Here is the general form for an HTML element:
<tag attribute="value">content</tag> |
Notice in the Hello World example we did, that HTML elements are not required to have attributes. Also note that we are able to nest elements inside each other -- the title tag is nested within the head tags which are nested within the html tags.
By using HTML elements, attributes, and nesting, we can create intricate layouts and beautiful, yet functional, documents.
The key thing to remember from this section is that HTML documents are composed of HTML elements.
0 comments:
Post a Comment