Skip to main content

ocsigen class and id

Goal

Set "class" and "id" attributes on elements

Recipe

 open Lwt open XHTML.M open Eliom_services open Eliom_parameters open Eliom_sessions open Eliom_predefmod.Xhtml   let main_handler sp () () =     Lwt.return       (html          (head (title (pcdata "ttt") [] ))          (body [ (div [pcdata "blabla"]) ;                   (div ~a:[(a_class ["ak"]); (a_id "ik")] [pcdata "blabla"])]))   let main_service =   Eliom_predefmod.Xhtml.register_new_service     ~path: [""]     ~get_params: Eliom_parameters.unit     main_handler