June 2025
Beginner
817 pages
31h 30m
English
You can use the style element to include style information (usually CSS) within the HTML document. Between <style> and </style>, you define how the web browser should display the HTML elements. Each HTML document can contain multiple style elements. Furthermore, since HTML 5, it’s valid to use this element within the HTML document body between <body> and </body>.
Referring to the HTML document /examples/chapter003/3_5/index.html from Section 3.5, instead of using the link element, you could use the style element to write the stylesheet information directly in the HTML document as follows:
<!doctype html><html lang="en"> <head> <style type="text/css">
p { width:220px; padding:10px; border ...Read now
Unlock full access