Use <source> Types
HTML
Hard
2 views
Problem Description
Create picture sources with correct type values for webp and jpeg.
Output Format
Print the HTML code.
Constraints
Use type image/webp and image/jpeg.
Official Solution
<!doctype html>
<html lang='en'>
<head>
<meta charset='utf-8'>\
<meta name='viewport' content='width=device-width, initial-scale=1'>
<title>meetcode</title>
</head>
<body>
<picture>
<source srcset='banner.webp' type='image/webp'>
<source srcset='banner.jpg' type='image/jpeg'>
<img src='banner.jpg' alt='meetcode banner'>
</picture>
</body>
</html>
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!