| 
									
										
										
										
											2018-10-12 15:37:13 -04:00
										 |  |  | --- | 
					
						
							|  |  |  | title: Create a Complex JSX Element | 
					
						
							|  |  |  | --- | 
					
						
							| 
									
										
										
										
											2019-01-15 17:15:27 -05:00
										 |  |  | # Create a Complex JSX Element
 | 
					
						
							| 
									
										
										
										
											2018-10-12 15:37:13 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-15 17:15:27 -05:00
										 |  |  | ## Hint
 | 
					
						
							|  |  |  | - nested JSX must return a single, top level element | 
					
						
							|  |  |  | - Ensure your solution has a parent `div` containing an `h1`, a `p`, and an unordered list (`ul`) that contains three `li` items | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ## Solution  
 | 
					
						
							| 
									
										
										
										
											2018-10-12 15:37:13 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | ```html | 
					
						
							|  |  |  | const JSX = <div> | 
					
						
							|  |  |  |   <h1>Heading.</h1> | 
					
						
							|  |  |  |   <p>Paragraph</p> | 
					
						
							|  |  |  |  <ul> | 
					
						
							|  |  |  |   <li>Coffee</li> | 
					
						
							|  |  |  |   <li>Tea</li> | 
					
						
							|  |  |  |   <li>Milk</li> | 
					
						
							|  |  |  | </ul> | 
					
						
							|  |  |  | </div>;   | 
					
						
							|  |  |  | ``` |