Skip to main content

HTML : Basic Codes

Add a "tooltip" to the paragraph below with the text "About W3Schools".

             <p title="About W3Schools">W3Schools is a web developer's site.</p>

Set the size of the image to 250 pixels wide and 400 pixels tall.

            <img src="w3schools.jpg" width="250" height="400">

Make the element below into a link that goes to "https://www.w3schools.com".

            <a href="https://www.w3schools.com">This is a link</a>

Specify an alternate text for the image.Alternate text is useful when the image cannot be displayed, like when the page is read by a screen reader.

            <img src="w3schools.png" alt="w3schools Logo">

Add a horizontal rule between the heading and the paragraph.

    <h1>London</h1>

    <hr>

    <p>London is the capital city of England. It is the most populous city in the United Kingdom, with a         metropolitan area of over 13 million inhabitants.</p>

Add a line break in the middle of the paragraph:

        <p>My Bonnie lies

        <br>

        <p>over the ocean.</p>

Wrap this poem around HTML tags that will preserve all spaces and line breaks when the element is displayed.

        <pre>

        My Bonnie lies over the ocean.

        Oh, bring back my Bonnie to me.

         </pre>

Use the correct HTML attribute, and CSS, to set the color of the paragraph to "blue".

        <p style="color:blue;">This is a paragraph.</p>

Use CSS to set the font of the paragraph to "courier".
        <p style="font-family:courier;">This is a paragraph.</p>

Use CSS to center align the paragraph.
        <p style="text-align:center;">This is a paragraph.</p>

Use CSS to set the text size to 50 pixels.
        <p style="font-size:50px;">This is a paragraph.</p>

Use CSS to set the background color of the document to yellow.
        <html>
            <body style="background-color:yellow;">
                <h1>This is a heading</h1>
                <p>This is a paragraph.</p>
            </body>
        </html>

Use CSS to center align the document.
    <html>
        <body >
            style="text-align:center;">
            <h1>This is a heading</h1>
            <p>This is a paragraph.</p>
        </body>
    </html>

Add extra importance to the word "degradation" in the paragraph below.
    <p>
        WWF's mission is to stop the <strong>degradation</strong> of our planet's natural environment.
    </p>

Emphasize the word "metropolitan" in the text below.
    <h1>Tokyo</h1>
    <p>Tokyo is the capital of Japan, the most populous <em>metropolitan</em> area in the world.</p>

Highlight the word "FUN" in the text below.
    <p>HTML is <mark>FUN</mark> to learn!</p>

Apply subscript formatting to the number "2" in the text below.
    <p>H<sub>2</sub>O is the scientific term for water.</p>

Add a line through (strikeout) the letters "blue" in the text below.

    <p>My favorite color is <del>blue</del> red.</p>

Use the correct HTML to make the text below into a link to "default.html".

    <a href="default.html">Visit our HTML tutorial.</a>

Use an HTML element to add quotation marks around the letters "cool".
    <p>I am so <q>cool</q>.</p>

The text below should be a quoted section.
Add the proper HTML element to it, and specify that it is quoted from the following URL:
http://www.worldwildlife.org/who/index.html

    <blockquotecite="http://www.worldwildlife.org/who/index.html">
    For 50 years, WWF has been protecting the future of nature. </blockquote>

Change text direction.Make the text below go right-to-left.

    <bdo dir="rtl">What a beautiful day!</bdo>

The letters "WHO" in the text below is an abbreviation of "World Health Organization".
Use an HTML element to provide the specified abbreviation of "WHO".

    <p>The <abbr title="World Health Organization"> WHO </abbr> was founded in 1948.</p>

Use the HTML comment tag to make a comment out of the "This is a comment" text.
    <h1>This is a heading</h1>
    <!--This is a comment -->

Use CSS to set the background color of the document (body) to yellow.
    <!DOCTYPE html>
    <html>
    <head><style>
    body{
        background-color:yellow;}
    </style></head>
    <body><h1>My Home Page</h1></body>
    </html>

Use CSS to set the font of the document to "courier".
<style>
body {font-family:courier;}
</style>

<style>
body {color:red;}
</style>

Use CSS to make a yellow, 1 pixel thick, border around all paragraphs.
<style>
p {border: 1px solid yellow;}</style>









Popular posts from this blog

C++ : Calculator

  # include < iostream > using namespace std ; int main () {     int a , b ;     char o ;     float c ;     cout << " Enter Value of A \n " ;     cin >> a ;     cout << " Enter Value of B \n " ;     cin >> b ;     cout << " Enter Operation \n " << " + for Addition \n - for substration \n * for multiplication \n / for division \n " ;     cin >> o ;     switch ( o )     {         case ' + ' :       {            c = a + b ;             break ;       }       case ' - ' :       {           c = a - b ;           break ;       }       case ' / ' :       {         ...

C++ : Pointer Program

# include < iostream > using namespace std ; int main () {     int a = 4 ;     int * b =& a ;     // & is address of operator     cout << " Thr address of a is " << & a << endl ;     cout << " Thr address of a is " << b << endl ;     // * is value at dereference operator     cout << " Thr value of a is " << * b << endl ;           // Pointer to pointer     int ** c =& b ; cout << " The adress of b is " << & b << endl ;     cout << " The adress of b is " << c << endl ;     cout << " The value at address c is " << * c << endl ;     cout << " The value at address value_at (value_at( c )) is " << ** c << endl ;     } OUTPUT =>           Thr address of...

Python : Small Projects (CWH)

  # Project 1 : Snake, Water, Game OR Rock,Paper,Scissor import random def game ( comp , you ) :     if comp == you :         return 2     elif comp == " s " :         if you == " w " :             return 0         elif you == " g " :             return 1     elif comp == " w " :         if you == " g " :             return 0         elif you == " s " :             return 1     elif comp == " g " :         if you == " w " :             return 0         elif you == " s " :             return 1 print ( " Computer turn : Snake(s),Water(w) or Gun(g) " ) randno = random . randint ( 1 , 3 ) if randno == 1 :  ...