Skip to content

Latest commit

 

History

History
47 lines (41 loc) · 2.72 KB

File metadata and controls

47 lines (41 loc) · 2.72 KB

Structure

-Many web pages act like electronic versions of these documents.

-In all kinds of documents, structure is very important in helping readers to understand the messages you are trying to convey and to navigate around the document.

-In order to learn how to write web pages, it is very important to understand how to structure documents.

-HTM L Describes the Structure of Pages :

-To describe the structure of a web page, we add code to the words we want to appear on the page.

<html>
<body>
<h1>This is the Main Heading</h1>
<p>This text might be an introduction to the rest of
the page. And if the page is a long one it might
be split up into several sub-headings.<p>
<h2>This is a Sub-Heading</h2>
<p>Many long articles have sub-headings so to help
you follow the structure of what is being written.
There may even be sub-sub-headings (or lower-level
headings).</p>
<h2>Another Sub-Heading</h2>
<p>Here you can see another sub-heading.</p>
</body>
</html>

-The HTML code is made up of characters that live inside angled brackets — these are called HTML Elements.

-Elements are usually made up of two tags , opening tag and closing tag (The closing tag has an extra forward slash in it.).

-Each HTML element tells the browser something about the information that sits between its opening and closing tags.

-Tags act like containers. They tell you something about the information that lies between their opening and closing tags.

  1. The opening html tag indicates that anything between it and a closing /html tag is HTML code.

  2. The body tag indicates that anything between it and the closing /body tag should be shown inside the main browser window.

  3. Words between h1 and /h1 are a main heading.

  4. A paragraph of text appears between these p and /p tags.

  5. Words between h2 and -/h2_ form a sub-heading.

  6. The closing /body tag indicates the end of what should appear in the main browser window.

  7. The closing /html tag indicates that it is the end of the HTML code.

-Attributes Tell Us More About Elements.

-Attributes provide additional information about the contents of an element.

-Attributes appear on the opening tag of the element and are made up of two parts , name and value, separated by an equals sign.

-The attribute name indicates what kind of extra information you are supplying about the element's content.

-The value is the information or setting for the attribute. It should be placed in double quotes.

-The majority of attributes can only be used on certain elements, although a few attributes can appear on any element.

-Most attribute values are either pre-defined or follow a stipulated format.