Computer Science, asked by kailashrva, 6 months ago

Write various rules for creating an html document.​

Answers

Answered by taronavijit
0

There are five important rules for coding with HTML tags.

  • Tags are always surrounded by angle brackets (less-than/greater-than characters), as in <HEAD>.
  • Most tags come in pairs and surround the material they affect. They work like a light switch: the first tag turns the action on, and the second turns it off. (There are some exceptions. For instance, the <BR> tag creates a blank line and doesn't have an "off switch." Once you've made a line break, you can't unmake it.)
  • The second tag--the "off switch"--always starts with a forward slash. For example, you turn on bold with <B>, shout your piece, and then go back to regular text with </B>.
  • First tag on, last tag off. Tags are embedded, so when you start a tag within another tag, you have to close that inner tag before closing the outer tag. For instance, the page will not display properly with the tags in this order:

<HEAD><TITLE>Your text</HEAD></TITLE>.

The correct order is:<HEAD><TITLE>Your. text<TITLE></HEAD>.

  • Many tags have optional attributes that use values to modify the tag's behavior. The <P> (paragraph) tag's ALIGN attribute, for instance, lets you change the default (left) paragraph alignment. For example, <P ALIGN=CENTER> centers the next paragraph on the page.

Remember, too, that HTML is always evolving, and older browsers often don't support the newest tags. When a browser encounters an HTML tag it doesn't understand, it will usually ignore both the tag and the material the tag affects. This way, the newest elements will appear to viewers with newer browsers without causing problems for viewers using older browsers, who will only see material their browsers recognize. On the downside, browsers treat coding errors like unfamiliar code. If you've made a mistake while building your page, you won't necessarily see an error message; you might just see nothing at all. You should always closely check all of your pages in a browser to make sure that everything that's supposed to be there appears properly. We also recommend looking at your pages in more than one version of Navigator and Internet Explorer (on both PC and Mac platforms, if possible) to make sure everything looks the way you intended, because not every browser type or version behaves the same way.

thank you.

Similar questions