css

html5's my file is succesfly.

I wanna set the @font-face in body {} or p{} 's styles.

And then I wanna set the writing-mode: tb-rl; in body {} 's styles.


At now I know the way for stylesheet's can do is so a few word only.

It's like this.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

body { background-color: #000000; background-image: url(Picture.jpg); background-repeaet: repeat-y; background-attachment: fixed; background -position: center top; }

p1 { color: #ff00ff; font-size: 30px; }

p2 { color #ccffcc; font-size: 40px; }


as save as file name.css on text edita that is named and added .css.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

html5 is called by this declare.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<!DOCTYPE html>

<html lang="ja">

<head>

<meta charset="Shift_JIS">

<meta name="ROBOTS" content="noindex,nofollow">

<meta http-equiv="imagetoolbar" content="no">

<title>daiary.html</title>

<meta name="discription" content="~~">

<meta name="keywords" content="word">

<link href="index.html" rel="start" type="text/html">

<link href=""file_name.css" rel="stylesheet" text/css">

</head>

<!-- It is appeared on page from this -->

<body oncontextmenu="return false">

<p1><i><b>my diary</b></i></p1><br>

<img src="Picture2.jpg" width="340" height="280">

<video oncontextmenu="return false" src=videoname.mp4" preload="none" width="640" height="480"></video>

<p2>I am trying to set the css</p2><br>

</body>

</html>

Two hints: 1. Fix the second link line in your html. 2. Spell words correctly.

Yeah, there are alot of typos there. At a glance:


repeaet -> repeat

background -position -> background-position

daiary.html -> diary.html

discription -> description


Start by fixing those errors, and go from there.


To answer your original question, though, to change the font, at the top level (not inside any rule), you would add something like this:

@font-face {
    font-family: "nameOfTheFont"; /* This can be anything; it need not match the font's actual name. */
    src: url(sansation_light.woff);
}

or similar.


Then, in the rule for your paragraph, add:

    p.classNameForParagraphsInADifferentFont {
        font-family: "nameOfTheFont", sans-serif; /* This must match the name you chose in the @font-face rule. */
    }


or similar.


To change the writing direction, it's just:


    p.rightToLeftParagraphyClassName {
        direction: rtl;
    }
css
 
 
Q