No products in the cart.

Write the rules for coding in …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

Write the rules for coding in HTML.
  • 1 answers

Neha Mishra 3 years, 8 months ago

There are five important rules for coding with HTML tags.

Tags are always surrounded by angle brackets (less-than/greater-than characters), as in <code><HEAD></code>.

  1. 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 <code><BR></code> tag creates a blank line and doesn't have an "off switch." Once you've made a line break, you can't unmake it.)
  2. The second tag--the "off switch"--always starts with a forward slash. For example, you turn on bold with <code><B></code>, shout your piece, and then go back to regular text with <code></B></code>.
  3. First tag on, the 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:

     

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

     

    The correct order is:

     

    <code><HEAD><TITLE></code>Your text<code></TITLE></HEAD></code>.
  4. Many tags have optional <i>attributes</i> that use <i>values</i> to modify the tag's behavior. The <code><P></code> (paragraph) tag's <code>ALIGN</code> attribute, for instance, lets you change the default (left) paragraph alignment. For example, <code><P ALIGN=CENTER></code> centers the next paragraph on the page.
http://mycbseguide.com/examin8/

Related Questions

Code for making time table in computer
  • 1 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App