How to do this?


#1

how to do this?
Give the first <p></p> an id attribute of "large".

Give the second <p></p> an id attribute of "small".


I don't know how to turn this into code
#3

Please tell us, have you have studied HTML and CSS before? How about JavaScript?


#4

1-2 i did, but 3 not

JSX elements can have attributes, just like HTML elements can.

A JSX attribute is written using HTML-like syntax: a name, followed by an equals sign, followed by a value. The value should be wrapped in quotes, like this:

my-attribute-name="my-attribute-value"
Here are some JSX elements with attributes:
Welcome to the Yahoo;

var title =

Introduction to React.js: Part I

;
A single JSX element can have many attributes, just like in HTML:

var panda = panda;

1.
Declare a variable named p1.
Set p1 equal to a JSX

element. Write the word foo in between the

tags.
2.
On the next line, declare a variable named p2.
Set p2 equal to another JSX

element. Write the word bar in between the

tags.
3.
Give the first

an id attribute of "large".
Give the second

an id attribute of "small".

#5

Im dont understand it is html or else I first time do this test i would like to learn to program


#6

This is like jumping into the deep end. May I recommend taking the JavaScript track before embarking on this course. Brush up on HTML/CSS while you are at it. Put this course on hold.


#7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.