Logo

Html->css()

ops...

Description

Creates a link(s) to a CSS style-sheet. If the block option is set to true, the link tags are added to the css block which you can print inside the head tag of the document. You can use the block option to control which block the link element will be appended to. By default it will append to the css block. If key ‘rel’ in $options array is set to ‘import’ the stylesheet will be imported. This method of CSS inclusion assumes that the CSS file specified resides inside the webroot/css directory if path doesn’t start with a ‘/’.

Usage: css(mixed $path, array $options = []) echo $this->Html->css('forms'); echo $this->Html->css(['forms', 'tables', 'menu']); Output: <link rel="stylesheet" href="/css/forms.css" /> <link rel="stylesheet" href="/css/forms.css" /> <link rel="stylesheet" href="/css/tables.css" /> <link rel="stylesheet" href="/css/menu.css" />